public static IRule <IParserResult> NotArgument <T>( this IConstraintsProviderContext <T> cpc, string argumentPropertyName) where T : IConfiguration { return(new Not <IParserResult>(cpc.ArgumentIsSet(argumentPropertyName))); }
public void ProvideConstraints(IConstraintsProviderContext <ICli2> cpc) { cpc.Add( new Implies <IParserResult>( cpc.ArgumentIsSet(nameof(ICli2.FileArg)), new FileExists((FileSystemItemArgument)cpc.GetArgument(nameof(ICli2.FileArg))))); }
public static IRule <IParserResult> ImpliesItemArgument <T>( this IConstraintsProviderContext <T> cpc, string itemPropertyName, string argumentPropertyName) where T : IConfiguration { return(new Implies <IParserResult>( cpc.ItemIsSet(itemPropertyName), cpc.ArgumentIsSet(argumentPropertyName))); }
public void ProvideConstraints(IConstraintsProviderContext <ICli4> cpc) { cpc.Add(cpc.ArgumentIsSet(nameof(ICli4.Option))); }