mirror of
https://github.com/nsnail/dot.git
synced 2025-06-19 22:08:16 +08:00
..
This commit is contained in:
@ -15,7 +15,7 @@ public sealed class Main : Tool<Option>
|
||||
|
||||
public Main(Option opt) : base(opt) { }
|
||||
|
||||
public override void Run()
|
||||
public override Task Run()
|
||||
{
|
||||
unsafe {
|
||||
var pSource = stackalloc char[_charTable.Sum(x => x.Length)];
|
||||
@ -47,7 +47,9 @@ public sealed class Main : Tool<Option>
|
||||
|
||||
var result = new string(pDest, 0, Opt.Length);
|
||||
ClipboardService.SetText(result);
|
||||
Console.WriteLine(Strings.Copied, result);
|
||||
Console.WriteLine(Str.Copied, result);
|
||||
}
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
namespace Dot.Pwd;
|
||||
|
||||
[Verb("pwd", HelpText = nameof(Strings.RandomPasswordGenerator), ResourceType = typeof(Strings))]
|
||||
[Verb("pwd", HelpText = nameof(Str.RandomPasswordGenerator), ResourceType = typeof(Str))]
|
||||
public class Option : IOption
|
||||
{
|
||||
[Flags]
|
||||
@ -12,10 +12,10 @@ public class Option : IOption
|
||||
, SpecialCharacter = 8
|
||||
}
|
||||
|
||||
[Value(1, Required = true, HelpText = nameof(Strings.PwdLength), ResourceType = typeof(Strings))]
|
||||
[Value(1, Required = true, HelpText = nameof(Str.PwdLength), ResourceType = typeof(Str))]
|
||||
public int Length { get; set; }
|
||||
|
||||
|
||||
[Value(0, Required = true, HelpText = nameof(Strings.PwdGenerateTypes), ResourceType = typeof(Strings))]
|
||||
[Value(0, Required = true, HelpText = nameof(Str.PwdGenerateTypes), ResourceType = typeof(Str))]
|
||||
public GenerateTypes Type { get; set; }
|
||||
}
|
Reference in New Issue
Block a user