<refactor>

This commit is contained in:
2022-12-01 11:26:41 +08:00
parent 8b1265b832
commit 85944f23b4
20 changed files with 391 additions and 86 deletions

21
src/Pwd/Option.cs Normal file
View File

@ -0,0 +1,21 @@
namespace Dot.Pwd;
[Verb("pwd", HelpText = nameof(Strings.RandomPasswordGenerator), ResourceType = typeof(Strings))]
public class Option : IOption
{
[Flags]
public enum GenerateTypes
{
Number = 1
, LowerCaseLetter = 2
, UpperCaseLetter = 4
, SpecialCharacter = 8
}
[Value(1, Required = true, HelpText = nameof(Strings.PwdLength), ResourceType = typeof(Strings))]
public int Length { get; set; }
[Value(0, Required = true, HelpText = nameof(Strings.PwdGenerateTypes), ResourceType = typeof(Strings))]
public GenerateTypes Type { get; set; }
}