Exemplo n.º 1
0
 protected ConfigurationBase()
 {
     this.ClassMapping    = new List <ClassMapping>();
     this.FieldMapping    = new List <FieldMapping>();
     this.PropertyMapping = new List <PropertyMapping>();
     this.Environment     = new ConfigurationEnvironment(null, null);
     this.Formatting      = new ConfigurationFormatting();
 }
Exemplo n.º 2
0
 public virtual void ApplyDefaults(ConfigurationFormatting defaults)
 {
     this.FileCase      = this.FileCase ?? defaults.FileCase;
     this.ClassCase     = this.ClassCase ?? defaults.ClassCase;
     this.FieldCase     = this.FieldCase ?? defaults.FieldCase;
     this.PropertyCase  = this.PropertyCase ?? defaults.PropertyCase;
     this.MethodCase    = this.MethodCase ?? defaults.MethodCase;
     this.ParameterCase = this.ParameterCase ?? defaults.ParameterCase;
 }
Exemplo n.º 3
0
 public virtual void CopyBaseFrom(ConfigurationBase source)
 {
     this.VerifySsl = source.VerifySsl;
     this.Language  = source.Language;
     this.AddHeader = source.AddHeader;
     this.ClassMapping.AddRange(source.ClassMapping);
     this.FieldMapping.AddRange(source.FieldMapping);
     this.PropertyMapping.AddRange(source.PropertyMapping);
     this.Standalone  = source.Standalone;
     this.Environment = source.Environment;
     this.Formatting  = source.Formatting;
 }
Exemplo n.º 4
0
        private static ConfigurationFormatting GetFormatting(IConfiguration configuration)
        {
            ConfigurationFormatting formatting = configuration.Formatting;

            if (configuration.Language is IFormattableLanguage formattableLanguage)
            {
                if (formatting == null)
                {
                    formatting = formattableLanguage.Formatting;
                }
                else
                {
                    formatting.ApplyDefaults(formattableLanguage.Formatting);
                }
            }
            return(formatting);
        }
Exemplo n.º 5
0
 public TestConfiguration()
 {
     this.Language   = new TestLanguage();
     this.Usings     = new List <string>();
     this.Formatting = new ConfigurationFormatting();
 }