protected internal StyleCopSettings() { this.spacingRules = new SpacingSettings(); this.readabilityRules = new ReadabilitySettings(); this.orderingRules = new OrderingSettings(); this.namingRules = new NamingSettings(); this.maintainabilityRules = new MaintainabilitySettings(); this.documentationRules = new DocumentationSettings(); }
protected internal StyleCopSettings(JsonObject settingsObject, AnalyzerConfigOptionsWrapper analyzerConfigOptions) { foreach (var kvp in settingsObject) { var childSettingsObject = kvp.Value.AsJsonObject; switch (kvp.Key) { case "indentation": kvp.AssertIsObject(); this.indentation = new IndentationSettings(childSettingsObject, analyzerConfigOptions); break; case "spacingRules": kvp.AssertIsObject(); this.spacingRules = new SpacingSettings(childSettingsObject, analyzerConfigOptions); break; case "readabilityRules": kvp.AssertIsObject(); this.readabilityRules = new ReadabilitySettings(childSettingsObject, analyzerConfigOptions); break; case "orderingRules": kvp.AssertIsObject(); this.orderingRules = new OrderingSettings(childSettingsObject, analyzerConfigOptions); break; case "namingRules": kvp.AssertIsObject(); this.namingRules = new NamingSettings(childSettingsObject, analyzerConfigOptions); break; case "maintainabilityRules": kvp.AssertIsObject(); this.maintainabilityRules = new MaintainabilitySettings(childSettingsObject, analyzerConfigOptions); break; case "layoutRules": kvp.AssertIsObject(); this.layoutRules = new LayoutSettings(childSettingsObject, analyzerConfigOptions); break; case "documentationRules": kvp.AssertIsObject(); this.documentationRules = new DocumentationSettings(childSettingsObject, analyzerConfigOptions); break; default: break; } } this.indentation ??= new IndentationSettings(new JsonObject(), analyzerConfigOptions); this.spacingRules ??= new SpacingSettings(new JsonObject(), analyzerConfigOptions); this.readabilityRules ??= new ReadabilitySettings(new JsonObject(), analyzerConfigOptions); this.orderingRules ??= new OrderingSettings(new JsonObject(), analyzerConfigOptions); this.namingRules ??= new NamingSettings(new JsonObject(), analyzerConfigOptions); this.maintainabilityRules ??= new MaintainabilitySettings(new JsonObject(), analyzerConfigOptions); this.layoutRules ??= new LayoutSettings(new JsonObject(), analyzerConfigOptions); this.documentationRules ??= new DocumentationSettings(new JsonObject(), analyzerConfigOptions); }
protected internal StyleCopSettings() { this.documentationRules = new DocumentationSettings(); this.namingRules = new NamingSettings(); }