public AnalyzerMetadata( string id, string identifier, string title, string messageFormat, string category, string defaultSeverity, bool isEnabledByDefault, bool isObsolete, bool supportsFadeOut, bool supportsFadeOutAnalyzer, string minLanguageVersion, string summary, string remarks, IEnumerable <SampleMetadata> samples, IEnumerable <LinkMetadata> links, IEnumerable <ConfigOptionKeyMetadata> configOptions, IEnumerable <AnalyzerOptionMetadata> options, IEnumerable <string> tags, AnalyzerOptionKind kind, AnalyzerMetadata parent) { Id = id; Identifier = identifier; Title = title; MessageFormat = messageFormat; Category = category; DefaultSeverity = defaultSeverity; IsEnabledByDefault = isEnabledByDefault; IsObsolete = isObsolete; SupportsFadeOut = supportsFadeOut; SupportsFadeOutAnalyzer = supportsFadeOutAnalyzer; MinLanguageVersion = minLanguageVersion; Summary = summary; Remarks = remarks; Tags = new ReadOnlyCollection <string>(tags?.ToArray() ?? Array.Empty <string>()); ConfigOptions = new ReadOnlyCollection <ConfigOptionKeyMetadata>(configOptions?.ToArray() ?? Array.Empty <ConfigOptionKeyMetadata>()); Samples = new ReadOnlyCollection <SampleMetadata>(samples?.ToArray() ?? Array.Empty <SampleMetadata>()); Links = new ReadOnlyCollection <LinkMetadata>(links?.ToArray() ?? Array.Empty <LinkMetadata>()); Options = new ReadOnlyCollection <AnalyzerOptionMetadata>(options?.ToArray() ?? Array.Empty <AnalyzerOptionMetadata>()); Kind = kind; Parent = parent; if (Parent != null) { _optionAnalyzers = new ReadOnlyCollection <AnalyzerMetadata>(new List <AnalyzerMetadata>()); } }
public AnalyzerMetadata CreateAnalyzerMetadata(AnalyzerMetadata parent) { return(new AnalyzerMetadata( id: (Id != null) ? parent.Id + Id : null, identifier: Identifier, title: Title, messageFormat: Title, category: "AnalyzerOption", defaultSeverity: parent.DefaultSeverity, isEnabledByDefault: IsEnabledByDefault, isObsolete: parent.IsObsolete || IsObsolete, supportsFadeOut: SupportsFadeOut, supportsFadeOutAnalyzer: false, minLanguageVersion: MinLanguageVersion ?? parent.MinLanguageVersion, summary: Summary, remarks: null, samples: Samples, links: null, options: null, kind: Kind, parent: parent)); }