dot/src/Random/Option.cs
2022-11-30 13:35:24 +08:00

21 lines
581 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace Dot.Random;
[Verb("rand", HelpText = "随机数生成器")]
public class Option : IOption
{
[Flags]
public enum GenerateTypes
{
Number = 1
, LowerCaseLetter = 2
, UpperCaseLetter = 4
, SpecialCharacter = 8
}
[Value(1, MetaName = "长度", Required = true, HelpText = "随机数字长度")]
public int Length { get; set; }
[Value(0, MetaName = "生成类型", Required = true, HelpText = "BitSet 1[0-9]2[a-z]4[A-Z]8[ascii.0x21-0x2F]")]
public GenerateTypes Type { get; set; }
}