feat: 搭建tool
This commit is contained in:
20
Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/TestCommand.cs
Normal file
20
Yi.Abp.Net8/tool/Yi.Abp.Tool/Commands/TestCommand.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
|
||||
namespace Yi.Abp.Tool.Commands;
|
||||
|
||||
public class TestCommand:ICommand
|
||||
{
|
||||
public string Command => "clear";
|
||||
|
||||
public Task CommandLineApplicationAsync(CommandLineApplication application)
|
||||
{
|
||||
var sss= application.Option("-i| --id|-l <ID>","内容id",CommandOptionType.SingleValue);
|
||||
|
||||
application.OnExecute(() =>
|
||||
{
|
||||
Console.WriteLine($"你好,---{sss.Value()}");
|
||||
return 0;
|
||||
});
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user