private static void ReportIssueOnRedundantObjectCreation(SyntaxNodeAnalysisContext context, ObjectCreationExpressionSyntax objectCreation, string message, RedundancyType redundancyType) { var location = Location.Create(objectCreation.SyntaxTree, TextSpan.FromBounds(objectCreation.SpanStart, objectCreation.Type.Span.End)); context.ReportDiagnosticWhenActive(Diagnostic.Create(rule, location, ImmutableDictionary <string, string> .Empty.Add(DiagnosticTypeKey, redundancyType.ToString()), message)); }
public RedundantTerminalGroup(IEnumerable <StatementGrammarNode> items, RedundancyType redundancyType) : base(items.ToArray()) { RedundancyType = redundancyType; }