diff options
author | 杨宇千 <crupest@outlook.com> | 2020-02-03 18:38:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-03 18:38:14 +0800 |
commit | e5fb17ddfc3d1ecf0b283c8cc1a91fb2a2a03236 (patch) | |
tree | 28ef20f9dfe742008bb934f09b99d1d4719cabaa /ErrorResponseCodeGenerator | |
parent | 673fa5f0645308bfa8d17dc4e0e145bbaf239329 (diff) | |
parent | 86c4e7834bf25b900af03edc53aea3f37f645334 (diff) | |
download | timeline-e5fb17ddfc3d1ecf0b283c8cc1a91fb2a2a03236.tar.gz timeline-e5fb17ddfc3d1ecf0b283c8cc1a91fb2a2a03236.tar.bz2 timeline-e5fb17ddfc3d1ecf0b283c8cc1a91fb2a2a03236.zip |
Merge pull request #57 from crupest/dev
Add normal timeline feature.
Diffstat (limited to 'ErrorResponseCodeGenerator')
-rw-r--r-- | ErrorResponseCodeGenerator/ErrorResponseCodeGenerator.csproj | 4 | ||||
-rw-r--r-- | ErrorResponseCodeGenerator/Program.cs | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ErrorResponseCodeGenerator/ErrorResponseCodeGenerator.csproj b/ErrorResponseCodeGenerator/ErrorResponseCodeGenerator.csproj index e77a1ba3..8524b2e4 100644 --- a/ErrorResponseCodeGenerator/ErrorResponseCodeGenerator.csproj +++ b/ErrorResponseCodeGenerator/ErrorResponseCodeGenerator.csproj @@ -6,6 +6,10 @@ </PropertyGroup>
<ItemGroup>
+ <PackageReference Include="TextCopy" Version="3.0.0" />
+ </ItemGroup>
+
+ <ItemGroup>
<ProjectReference Include="..\Timeline.ErrorCodes\Timeline.ErrorCodes.csproj" />
</ItemGroup>
diff --git a/ErrorResponseCodeGenerator/Program.cs b/ErrorResponseCodeGenerator/Program.cs index cf021927..5ea8aaca 100644 --- a/ErrorResponseCodeGenerator/Program.cs +++ b/ErrorResponseCodeGenerator/Program.cs @@ -57,6 +57,12 @@ $ ".Replace("$", code);
Console.WriteLine(code);
+
+ TextCopy.Clipboard.SetText(code);
+ var oldColor = Console.ForegroundColor;
+ Console.ForegroundColor = ConsoleColor.Green;
+ Console.WriteLine("Code has copied to clipboard!");
+ Console.ForegroundColor = oldColor;
}
}
}
|