aboutsummaryrefslogtreecommitdiff
path: root/ErrorResponseCodeGenerator/Program.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-02-02 22:52:33 +0800
committercrupest <crupest@outlook.com>2020-02-02 22:52:33 +0800
commitbcf15408ca1a1a16ccaca959861e812e6b24a33d (patch)
tree9a0a539cdaf50a8f35bfbcf65197fce26634feb1 /ErrorResponseCodeGenerator/Program.cs
parent12f85448cde94d70d9030b757b09caa5e2f53061 (diff)
downloadtimeline-bcf15408ca1a1a16ccaca959861e812e6b24a33d.tar.gz
timeline-bcf15408ca1a1a16ccaca959861e812e6b24a33d.tar.bz2
timeline-bcf15408ca1a1a16ccaca959861e812e6b24a33d.zip
Add copy to clipboard function to code generator.
Diffstat (limited to 'ErrorResponseCodeGenerator/Program.cs')
-rw-r--r--ErrorResponseCodeGenerator/Program.cs6
1 files changed, 6 insertions, 0 deletions
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;
}
}
}