mycroforge/MycroForge.CLI/Commands/MycroForge.Init.Binder.cs
mdnapo 02a82589ae - Refactored init & features
- Extended documentation
2024-07-14 22:27:32 +02:00

21 lines
730 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),
};
}
}
}