<adjust> * 多平台支持

This commit is contained in:
2022-12-09 12:37:21 +08:00
parent ea75f46af3
commit f4b7c5d0ad
12 changed files with 61 additions and 19 deletions

View File

@ -1,4 +1,6 @@
#if NET7_0_WINDOWS
using TextCopy;
#endif
namespace Dot.Guid;
@ -11,8 +13,10 @@ public sealed class Main : ToolBase<Option>
{
var guid = System.Guid.NewGuid().ToString();
if (Opt.Upper) guid = guid.ToUpper();
ClipboardService.SetText(guid);
Console.WriteLine(Str.Copied, guid);
#if NET7_0_WINDOWS
ClipboardService.SetText(guid);
#endif
return Task.CompletedTask;
}
}