This commit is contained in:
2022-12-09 16:39:04 +08:00
parent f4b7c5d0ad
commit 0594ec1836
37 changed files with 276 additions and 183 deletions

View File

@ -4,11 +4,10 @@ using TextCopy;
namespace Dot.Guid;
[Description(nameof(Str.GuidTool))]
[Localization(typeof(Str))]
public sealed class Main : ToolBase<Option>
{
public Main(Option opt) : base(opt) { }
protected override Task Core()
{
var guid = System.Guid.NewGuid().ToString();

View File

@ -1,8 +1,10 @@
namespace Dot.Guid;
[Verb("guid", HelpText = nameof(Str.GuidTool), ResourceType = typeof(Str))]
public class Option : OptionBase
{
[Option('u', "upper", HelpText = nameof(Str.UseUppercase), Default = false, ResourceType = typeof(Str))]
[CommandOption("-u|--upper")]
[Description(nameof(Str.UseUppercase))]
[Localization(typeof(Str))]
[DefaultValue(false)]
public bool Upper { get; set; } //normal options here
}