Ejemplo n.º 1
0
 public static IRule <IParserResult> NotArgument <T>(
     this IConstraintsProviderContext <T> cpc,
     string argumentPropertyName)
     where T : IConfiguration
 {
     return(new Not <IParserResult>(cpc.ArgumentIsSet(argumentPropertyName)));
 }
Ejemplo n.º 2
0
 public void ProvideConstraints(IConstraintsProviderContext <ICli2> cpc)
 {
     cpc.Add(
         new Implies <IParserResult>(
             cpc.ArgumentIsSet(nameof(ICli2.FileArg)),
             new FileExists((FileSystemItemArgument)cpc.GetArgument(nameof(ICli2.FileArg)))));
 }
Ejemplo n.º 3
0
 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)));
 }
Ejemplo n.º 4
0
 public void ProvideConstraints(IConstraintsProviderContext <ICli4> cpc)
 {
     cpc.Add(cpc.ArgumentIsSet(nameof(ICli4.Option)));
 }