Exemple #1
0
      public override IViolation<ICliSpecification> Check(
            ICliSpecification subject,
            IBehaviors context = null ) {
         ConfigBehavior cb = null;
         context?.TryGet( out cb );
         ICliConfig conf = cb?.Config;

         foreach( Func<UniqueNames, ICliSpecification, ICliConfig, IViolation<ICliSpecification>> check
               in __checks ) {
            IViolation<ICliSpecification> violation = check( this, subject, conf );
            if( violation != NonViolation<ICliSpecification>.Instance )
               return violation;
         }

         return NonViolation<ICliSpecification>.Instance;
      }
Exemple #2
0
 public static IConfig Create(String path, ConfigType type, ConfigOptions options)
 {
     return(new Config(ConfigBehavior.Create(path, type, options)));
 }
Exemple #3
0
 public static IConfig Create(String path, ConfigType type)
 {
     return(new Config(ConfigBehavior.Create(path, type)));
 }
Exemple #4
0
 public static IConfig Create(String path)
 {
     return(new Config(ConfigBehavior.Create(path)));
 }
Exemple #5
0
 public Config(String path, ConfigType type = DefaultConfigType, ConfigOptions options = DefaultConfigOptions)
     : this(ConfigBehavior.Create(path, type, options))
 {
 }
Exemple #6
0
 public new static IPropertyConfig Create(String path, ConfigOptions options)
 {
     return(new PropertyConfig(ConfigBehavior.Create(path, options)));
 }
Exemple #7
0
 public new static IPropertyConfig Create(String path, ConfigType type)
 {
     return(new PropertyConfig(ConfigBehavior.Create(path, type)));
 }