jtr/Jtr.Tools.CLI/Json2CSharpCommand.CommandOptionsBinder.cs
mdnapo 96c203f842
All checks were successful
Run the JSON parser tests / test (push) Has been skipped
Moved UI to separate project, added Dockerfile & renamed project
2024-10-19 12:04:40 +02:00

17 lines
581 B
C#

using System.CommandLine.Binding;
using Jtr.Tools.CLI.Extensions;
namespace Jtr.Tools.CLI;
public partial class Json2CSharpCommand
{
public class CommandOptionsBinder : BinderBase<CommandOptions>
{
protected override CommandOptions GetBoundValue(BindingContext context) =>
new CommandOptions
{
RootClassName = context.ParseResult.GetValueForOption(RootClassNameOption),
Namespace = context.ParseResult.GetValueForOption(NamespaceOption),
}.WithCommonBindings(context);
}
}