mycroforge/MycroForge.CLI/Commands/MycroForge.Init.Binder.cs

22 lines
815 B
C#

using System.CommandLine.Binding;
namespace MycroForge.CLI.Commands;
public partial class MycroForge
{
public partial class Init
{
public class Binder : BinderBase<Options>
{
protected override Options GetBoundValue(BindingContext ctx) => new()
{
Name = ctx.ParseResult.GetValueForArgument(NameArgument),
Without = ctx.ParseResult.GetValueForOption(WithoutOption),
ApiPort = ctx.ParseResult.GetValueForOption(ApiPortOption),
DbhPort = ctx.ParseResult.GetValueForOption(DbhPortOption),
DbuPort = ctx.ParseResult.GetValueForOption(DbuPortOption),
DbuPlatform = ctx.ParseResult.GetValueForOption(DbuPlatformOption),
};
}
}
}