private static void ParseRootNodeAttributes(XElement rootElement, AnalyzerConfigBuilder configBuilder) { configBuilder.SetIsEnabled(ParseAttribute <bool>(rootElement, IsEnabledAttributeName, bool.TryParse)); configBuilder.SetInheritanceDepth(ParseAttribute <int>(rootElement, InheritanceDepthAttributeName, int.TryParse)); configBuilder.SetIssueKind(ParseAttribute <IssueKind>(rootElement, CodeIssueKindAttributeName, Enum.TryParse)); configBuilder.SetInfoImportance(ParseAttribute <Importance>(rootElement, InfoImportanceAttributeName, Enum.TryParse)); configBuilder.SetChildCanDependOnParentImplicitly(ParseAttribute <bool>(rootElement, ImplicitParentDependencyAttributeName, bool.TryParse)); configBuilder.SetMaxIssueCount(ParseAttribute <int>(rootElement, MaxIssueCountAttributeName, int.TryParse)); }
private static void ParseRootNodeAttributes(XElement rootElement, AnalyzerConfigBuilder configBuilder) { configBuilder.SetIsEnabled(ParseValueType <bool>(rootElement, IsEnabledAttributeName, bool.TryParse)); configBuilder.SetInheritanceDepth(ParseValueType <int>(rootElement, InheritanceDepthAttributeName, int.TryParse)); configBuilder.SetIssueKind(ParseValueType <IssueKind>(rootElement, CodeIssueKindAttributeName, Enum.TryParse)); configBuilder.SetInfoImportance(ParseValueType <Importance>(rootElement, InfoImportanceAttributeName, Enum.TryParse)); configBuilder.SetAnalyzerServiceCallRetryTimeSpans(ParseReferenceType <TimeSpan[]>(rootElement, AnalyzerServiceCallRetryTimeSpansAttributeName, TryParseTimeSpans)); configBuilder.SetChildCanDependOnParentImplicitly(ParseValueType <bool>(rootElement, ImplicitParentDependencyAttributeName, bool.TryParse)); configBuilder.SetMaxIssueCount(ParseValueType <int>(rootElement, MaxIssueCountAttributeName, int.TryParse)); configBuilder.SetMaxIssueCountSeverity(ParseValueType <IssueKind>(rootElement, MaxIssueCountSeverityAttributeName, Enum.TryParse)); }