forked from amkovkov/GranuSightSoftware2
feat: starting to build a application itself
add "capture" and "camera-tuning" commands for cli
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System.CommandLine;
|
||||
|
||||
namespace GSS2.Commands;
|
||||
|
||||
public static class ImageStorageClear
|
||||
{
|
||||
public static readonly RootCommand RootCommand;
|
||||
private static readonly Command Command;
|
||||
|
||||
static ImageStorageClear()
|
||||
{
|
||||
// Создаём команды, опции, аргументы и пр.
|
||||
RootCommand = new("Очистить хранилище от неиспользуемых изображений");
|
||||
Command = new("image-storage-clear")
|
||||
{
|
||||
Description = "Очистить хранилище от неиспользуемых изображений"
|
||||
};
|
||||
|
||||
// Изменяем описания стандартных опций
|
||||
Helper.TranslateDefaultOptionDescriptions(RootCommand);
|
||||
|
||||
// Наполняем команды
|
||||
RootCommand.SetAction(CommandAction);
|
||||
|
||||
Command.SetAction(CommandAction);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Получить команду как корневую
|
||||
/// </summary>
|
||||
public static RootCommand GetCommand() => RootCommand;
|
||||
|
||||
/// <summary>
|
||||
/// Зарегистрировать команду как подкоманду
|
||||
/// </summary>
|
||||
/// <param name="command">Команда в которой необходимо зарегистрировать подкоманду</param>
|
||||
public static void RegisterCommand(Command command) => command.Add(Command);
|
||||
|
||||
private static void CommandAction(ParseResult result)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user