Compare commits
1 Commits
5d311bc08c
...
c4a14f1d7e
Author | SHA1 | Date |
---|---|---|
Jaculabilis | c4a14f1d7e |
|
@ -7,4 +7,8 @@
|
|||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,12 +1,41 @@
|
|||
using System;
|
||||
|
||||
using CommandLine;
|
||||
using CommandLine.Text;
|
||||
|
||||
namespace MultiversalDiplomacy
|
||||
{
|
||||
[Verb("adjudicate", HelpText = "")]
|
||||
internal class AdjudicateOptions
|
||||
{
|
||||
[Option('i', "input")]
|
||||
public string? InputFile { get; set; }
|
||||
}
|
||||
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("stab");
|
||||
var parser = new Parser(options =>
|
||||
{
|
||||
options.AutoVersion = false;
|
||||
options.HelpWriter = null;
|
||||
});
|
||||
var parseResult = parser.ParseArguments(args, typeof(AdjudicateOptions));
|
||||
var helpText = HelpText.AutoBuild(parseResult, options =>
|
||||
{
|
||||
options.AdditionalNewLineAfterOption = false;
|
||||
return HelpText.DefaultParsingErrorsHandler(parseResult, options);
|
||||
});
|
||||
|
||||
parseResult
|
||||
.WithParsed<AdjudicateOptions>(Adjudicate)
|
||||
.WithNotParsed(errs => Console.WriteLine(helpText));
|
||||
}
|
||||
|
||||
static void Adjudicate(AdjudicateOptions args)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue