Exemple #1
0
        public IEnumerable <string> ToStrings()
        {
            yield return($"IsEnabled={IsEnabled}");

            yield return($"DependencyIssueSeverity={DependencyIssueSeverity}");

            yield return($"InfoImportance={InfoImportance}");

            yield return($"AnalyzerServiceCallRetryTimeSpans={string.Join(",", AnalyzerServiceCallRetryTimeSpans)}");

            yield return($"SourcePathExclusionPatterns={string.Join(",", SourcePathExclusionPatterns)}");

            yield return($"ChildCanDependOnParentImplicitly={ChildCanDependOnParentImplicitly}");

            foreach (var s in AllowRules.ToStrings())
            {
                yield return(s);
            }
            foreach (var s in DisallowRules.ToStrings())
            {
                yield return(s);
            }
            foreach (var s in VisibleTypesByNamespace.ToStrings())
            {
                yield return(s);
            }
            yield return($"MaxIssueCount={MaxIssueCount}");

            yield return($"MaxIssueCountSeverity={MaxIssueCountSeverity}");
        }
        public IEnumerable <string> ToStrings()
        {
            yield return($"IsEnabled={IsEnabled}");

            yield return($"IssueKind={IssueKind}");

            yield return($"InfoImportance={InfoImportance}");

            yield return($"ChildCanDependOnParentImplicitly={ChildCanDependOnParentImplicitly}");

            foreach (var s in AllowRules.ToStrings())
            {
                yield return(s);
            }
            foreach (var s in DisallowRules.ToStrings())
            {
                yield return(s);
            }
            foreach (var s in VisibleTypesByNamespace.ToStrings())
            {
                yield return(s);
            }
            yield return($"MaxIssueCount={MaxIssueCount}");

            yield return($"MaxWarningErrorThreshold={MaxWarningErrorThreshold}");
        }
        public IEnumerable <string> ToStrings()
        {
            if (InheritanceDepth.HasValue)
            {
                yield return($"InheritanceDepth={InheritanceDepth}");
            }
            if (IsEnabled.HasValue)
            {
                yield return($"IsEnabled={IsEnabled}");
            }
            if (IssueKind.HasValue)
            {
                yield return($"IssueKind={IssueKind}");
            }
            if (InfoImportance.HasValue)
            {
                yield return($"InfoImportance={InfoImportance}");
            }
            if (AnalyzerServiceCallRetryTimeSpans != null)
            {
                yield return($"AnalyzerServiceCallRetryTimeSpans={string.Join(",", AnalyzerServiceCallRetryTimeSpans)}");
            }

            if (ChildCanDependOnParentImplicitly.HasValue)
            {
                yield return($"ChildCanDependOnParentImplicitly={ChildCanDependOnParentImplicitly}");
            }
            if (AllowRules.Any())
            {
                foreach (var s in AllowRules.ToStrings())
                {
                    yield return(s);
                }
            }
            if (DisallowRules.Any())
            {
                foreach (var s in DisallowRules.ToStrings())
                {
                    yield return(s);
                }
            }
            if (VisibleTypesByNamespace.Any())
            {
                foreach (var s in VisibleTypesByNamespace.ToStrings())
                {
                    yield return(s);
                }
            }
            if (MaxIssueCount.HasValue)
            {
                yield return($"MaxIssueCount={MaxIssueCount}");
            }
            if (MaxIssueCountSeverity.HasValue)
            {
                yield return($"MaxIssueCountSeverity={MaxIssueCountSeverity}");
            }
        }
        public IEnumerable <string> ToStrings()
        {
            if (InheritanceDepth.HasValue)
            {
                yield return($"InheritanceDepth={InheritanceDepth}");
            }
            if (IsEnabled.HasValue)
            {
                yield return($"IsEnabled={IsEnabled}");
            }
            if (IssueKind.HasValue)
            {
                yield return($"IssueKind={IssueKind}");
            }
            if (InfoImportance.HasValue)
            {
                yield return($"InfoImportance={InfoImportance}");
            }

            if (ChildCanDependOnParentImplicitly.HasValue)
            {
                yield return($"ChildCanDependOnParentImplicitly={ChildCanDependOnParentImplicitly}");
            }
            if (AllowRules.Any())
            {
                foreach (var s in AllowRules.ToStrings())
                {
                    yield return(s);
                }
            }
            if (DisallowRules.Any())
            {
                foreach (var s in DisallowRules.ToStrings())
                {
                    yield return(s);
                }
            }
            if (VisibleTypesByNamespace.Any())
            {
                foreach (var s in VisibleTypesByNamespace.ToStrings())
                {
                    yield return(s);
                }
            }
            if (MaxIssueCount.HasValue)
            {
                yield return($"MaxIssueCount={MaxIssueCount}");
            }
            if (MaxWarningErrorThreshold.HasValue)
            {
                yield return($"MaxWarningErrorThreshold={MaxWarningErrorThreshold}");
            }
        }
 public AnalyzerConfigBuilder AddDisallowRule(NamespaceDependencyRule namespaceDependencyRule)
 {
     DisallowRules.Add(namespaceDependencyRule);
     return(this);
 }