17 lines
609 B
C#
17 lines
609 B
C#
using System.CommandLine.Binding;
|
|
using DevDisciples.Json.Tools.CLI.Extensions;
|
|
|
|
namespace DevDisciples.Json.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);
|
|
}
|
|
} |