예제 #1
0
        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}");
            }
        }
예제 #2
0
        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}");
            }
        }