jtr/DevDisciples.Json.Tools.CLI/JsonPrettifyCommand.CommandOptionsBinder.cs
2024-09-15 17:23:27 +02:00

16 lines
518 B
C#

using System.CommandLine.Binding;
using DevDisciples.Json.Tools.CLI.Extensions;
namespace DevDisciples.Json.Tools.CLI;
public partial class JsonPrettifyCommand
{
public class CommandOptionsBinder : BinderBase<CommandOptions>
{
protected override CommandOptions GetBoundValue(BindingContext context) =>
new CommandOptions
{
IndentSize = context.ParseResult.GetValueForOption(IndentSizeOption)
}.WithCommonBindings(context);
}
}