16 lines
504 B
C#
16 lines
504 B
C#
using System.CommandLine.Binding;
|
|
using DevDisciples.Json.Tools.CLI.Extensions;
|
|
|
|
namespace DevDisciples.Json.Tools.CLI;
|
|
|
|
public partial class JsonPathCommand
|
|
{
|
|
public class CommandOptionsBinder : BinderBase<CommandOptions>
|
|
{
|
|
protected override CommandOptions GetBoundValue(BindingContext context) =>
|
|
new CommandOptions
|
|
{
|
|
PathExpression = context.ParseResult.GetValueForOption(PathExpressionOption)
|
|
}.WithCommonBindings(context);
|
|
}
|
|
} |