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 | 97010e98a11ad6fd6c075cee414c30174001fe5d (patch) | |
tree | 28ef20f9dfe742008bb934f09b99d1d4719cabaa /ErrorResponseCodeGenerator | |
parent | 1c880744293c9f47ff1241109b72c035680251df (diff) | |
parent | be8cbe2c4ddf2076cc02bcb2feb1a70d30a4bda0 (diff) | |
download | timeline-97010e98a11ad6fd6c075cee414c30174001fe5d.tar.gz timeline-97010e98a11ad6fd6c075cee414c30174001fe5d.tar.bz2 timeline-97010e98a11ad6fd6c075cee414c30174001fe5d.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;
}
}
}
|