Created the Avalonia MVVM template, split the CLI into Avalonia.UI and Avalonia.Core
This commit is contained in:
73
AutumnLauncher.CLI/Options.cs
Normal file
73
AutumnLauncher.CLI/Options.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using CommandLine;
|
||||
|
||||
namespace AutumnLauncher.CLI;
|
||||
|
||||
// Command-line options for the --run argument
|
||||
[Verb("run", HelpText = "Run a game.")]
|
||||
public class RunOptions
|
||||
{
|
||||
[Option('i', "id", Required = true, HelpText = "Game ID.")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
|
||||
// Command-line options for the --remove argument
|
||||
[Verb("remove", HelpText = "Remove a game.")]
|
||||
public class RemoveOptions
|
||||
{
|
||||
[Option('i', "id", Required = true, HelpText = "Game ID.")]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
|
||||
// Command-line options for the --list argument
|
||||
[Verb("list", HelpText = "List all games.")]
|
||||
public class ListOptions
|
||||
{
|
||||
}
|
||||
|
||||
// Command-line options for the --add argument
|
||||
[Verb("add", HelpText = "Add a game.")]
|
||||
public class AddOptions
|
||||
{
|
||||
[Option('n', "name", Required = true, HelpText = "Game name.")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[Option('d', "developer", Required = true, HelpText = "Game developer.")]
|
||||
public string? Developer { get; set; }
|
||||
|
||||
[Option('r', "date", Required = true, HelpText = "Release date.")]
|
||||
public string? Date { get; set; }
|
||||
|
||||
[Option('g', "genre", Required = true, HelpText = "Game genre.")]
|
||||
public string? Genre { get; set; }
|
||||
|
||||
[Option('t', "type", Required = true, HelpText = "Game type.")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[Option('p', "path", Required = true, HelpText = "Game path.")]
|
||||
public string? Path { get; set; }
|
||||
}
|
||||
|
||||
[Verb("edit", HelpText = "Add a game.")]
|
||||
public class EditOptions
|
||||
{
|
||||
[Option('i', "id", Required = true, HelpText = "Game id.")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Option('n', "name", Required = false, HelpText = "Game name.")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[Option('d', "developer", Required = false, HelpText = "Game developer.")]
|
||||
public string? Developer { get; set; }
|
||||
|
||||
[Option('r', "date", Required = false, HelpText = "Release date.")]
|
||||
public string? Date { get; set; }
|
||||
|
||||
[Option('g', "genre", Required = false, HelpText = "Game genre.")]
|
||||
public string? Genre { get; set; }
|
||||
|
||||
[Option('t', "type", Required = false, HelpText = "Game type.")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[Option('p', "path", Required = false, HelpText = "Game path.")]
|
||||
public string? Path { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user