public static IRule <IParserResult> NotItem <T>( this IConstraintsProviderContext <T> cpc, string itemPropertyName) where T : IConfiguration { return(new Not <IParserResult>(cpc.ItemIsSet(itemPropertyName))); }
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 static IRule <IParserResult> ImpliesItemItem <T>( this IConstraintsProviderContext <T> cpc, string itemPropertyName1, string itemPropertyName2) where T : IConfiguration { return(new Implies <IParserResult>( cpc.ItemIsSet(itemPropertyName1), cpc.ItemIsSet(itemPropertyName2))); }
public void ProvideConstraints(IConstraintsProviderContext <ICli4> cpc) { cpc.Add(cpc.ArgumentIsSet(nameof(ICli4.Option))); }
public void ProvideConstraints(IConstraintsProviderContext <ICliOr> cpc) { cpc.Add(cpc.OrItemItem(nameof(ICliOr.Option), nameof(ICliOr.Flag))); }
public void ProvideConstraints(IConstraintsProviderContext <ICliImplies> cpc) { cpc.Add(cpc.ImpliesItemItem(nameof(ICliImplies.Option), nameof(ICliImplies.Flag))); }
public void ProvideConstraints(IConstraintsProviderContext <ICliAnd> cpc) { cpc.Add(cpc.AndItemItem(nameof(ICliAnd.Option), nameof(ICliAnd.Flag))); }