mirror of
https://github.com/nsnail/dot.git
synced 2025-06-19 22:08:16 +08:00
<style>
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
// ReSharper disable ClassNeverInstantiated.Global
|
||||
|
||||
|
||||
using System.Globalization;
|
||||
#if NET7_0_WINDOWS
|
||||
using TextCopy;
|
||||
#endif
|
||||
@ -13,8 +14,11 @@ internal sealed class Main : ToolBase<Option>
|
||||
{
|
||||
protected override Task Core()
|
||||
{
|
||||
var guid = System.Guid.NewGuid().ToString();
|
||||
if (Opt.Upper) guid = guid.ToUpper();
|
||||
var guid = System.Guid.NewGuid().ToString();
|
||||
if (Opt.Upper) {
|
||||
guid = guid.ToUpper(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
Console.WriteLine(Str.Copied, guid);
|
||||
#if NET7_0_WINDOWS
|
||||
ClipboardService.SetText(guid);
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace Dot.Guid;
|
||||
|
||||
internal class Option : OptionBase
|
||||
internal sealed class Option : OptionBase
|
||||
{
|
||||
[CommandOption("-u|--upper")]
|
||||
[Description(nameof(Str.UseUppercase))]
|
||||
|
Reference in New Issue
Block a user