22 references to EmbeddedDiagnostic
Microsoft.AspNetCore.App.Analyzers (22)
Infrastructure\RoutePattern\RoutePatternLexer.cs (8)
146token = token.AddDiagnosticIfNone(new EmbeddedDiagnostic( 152token = token.AddDiagnosticIfNone(new EmbeddedDiagnostic( 158token = token.AddDiagnosticIfNone(new EmbeddedDiagnostic( 223new EmbeddedDiagnostic(Resources.TemplateRoute_UnescapedBrace, token.GetSpan())); 228new EmbeddedDiagnostic(Resources.FormatTemplateRoute_InvalidParameterName(token.Value!.ToString().Replace("{{", "{").Replace("}}", "}")), token.GetSpan())); 296new EmbeddedDiagnostic(Resources.TemplateRoute_UnescapedBrace, token.GetSpan())); 386new EmbeddedDiagnostic(Resources.TemplateRoute_UnescapedBrace, token.GetSpan())); 429new EmbeddedDiagnostic(Resources.AttributeRoute_TokenReplacement_UnescapedBraceInToken, token.GetSpan()));
Infrastructure\RoutePattern\RoutePatternParser.cs (14)
106diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_InvalidRouteTemplate, segmentPart.GetSpan())); 119diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_InvalidRouteTemplate, segmentPart.GetSpan())); 135diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_CatchAllMustBeLast, catchAllParameterNode.GetSpan())); 150diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_CannotHaveCatchAllInMultiSegment, catchAllParameterNode.GetSpan())); 178diagnostics.Add(new EmbeddedDiagnostic(message, segmentNode.GetSpan())); 195diagnostics.Add(new EmbeddedDiagnostic(message, parameterNode.GetSpan())); 202diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_CannotHaveConsecutiveParameters, parameterNode.GetSpan())); 266diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_OptionalCannotHaveDefaultValue, parameterNode.GetSpan())); 270diagnostics.Add(new EmbeddedDiagnostic(Resources.TemplateRoute_CatchAllCannotBeOptional, parameterNode.GetSpan())); 282diagnostics.Add(new EmbeddedDiagnostic(Resources.FormatTemplateRoute_RepeatedParameter(name), parameterNode.GetSpan())); 302new EmbeddedDiagnostic( 456new EmbeddedDiagnostic(Resources.AttributeRoute_TokenReplacement_EmptyTokenNotAllowed, _currentToken.GetFullSpan()!.Value)); 489return result.AddDiagnosticIfNone(new EmbeddedDiagnostic(error, GetTokenStartPositionSpan(_currentToken))); 531new EmbeddedDiagnostic(Resources.FormatTemplateRoute_InvalidParameterName(""), _currentToken.GetFullSpan()!.Value))));