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(); }
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; }
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; }
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); }
public TestConfiguration() { this.Language = new TestLanguage(); this.Usings = new List <string>(); this.Formatting = new ConfigurationFormatting(); }