5dplomacy/MultiversalDiplomacy/Program.cs

33 lines
854 B
C#
Raw Normal View History

2024-08-16 20:33:13 +00:00
using CommandLine;
2022-02-12 19:33:03 +00:00
2024-08-16 20:33:13 +00:00
using MultiversalDiplomacy.CommandLine;
namespace MultiversalDiplomacy;
internal class Program
2022-02-12 19:33:03 +00:00
{
2024-08-16 20:33:13 +00:00
[Verb("stab", HelpText = "stab")]
private class StabOptions
{
public static void Execute(StabOptions _)
=> Console.WriteLine("stab");
}
static void Main(string[] args)
2022-02-12 19:33:03 +00:00
{
2024-08-16 20:33:13 +00:00
var parser = Parser.Default;
var parseResult = parser.ParseArguments(
args,
typeof(AdjudicateOptions),
typeof(ImageOptions),
typeof(ReplOptions),
typeof(StabOptions));
parseResult
.WithParsed<AdjudicateOptions>(AdjudicateOptions.Execute)
.WithParsed<ImageOptions>(ImageOptions.Execute)
.WithParsed<ReplOptions>(ReplOptions.Execute)
.WithParsed<StabOptions>(StabOptions.Execute);
2022-02-12 19:33:03 +00:00
}
2024-08-16 20:33:13 +00:00
}