348 references to GetLocation
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.DetectInvalidModelNames.cs (1)
32context.ReportDiagnostic(Diagnostic.Create(Diagnostics.s_modelNameMustBeValid, token.GetLocation(), validationMessage));
Microsoft.AspNetCore.App.Analyzers (4)
Mvc\DetectAmbiguousActionRoutes.cs (1)
44ambiguousActionRoute.RouteUsageModel.UsageContext.RouteToken.GetLocation(),
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (2)
515? parentOpt.Value.GetLocation().SourceSpan.Start 518? parentOpt.Value.GetLocation().SourceSpan.End
RouteHandlers\DetectAmbiguousRoutes.cs (1)
42model.UsageContext.RouteToken.GetLocation(),
Microsoft.CodeAnalysis (3)
Binding\BindingDiagnosticBag.cs (2)
215=> Add(useSiteInfo, static token => token.GetLocation(), token); 280=> Add(useSiteInfo, static token => token.GetLocation(), token);
Syntax\SyntaxNodeOrToken.cs (1)
832return token.GetLocation();
Microsoft.CodeAnalysis.CodeStyle (17)
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
148operatorToken.GetLocation(),
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
147node.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
112additionalLocations: ImmutableArray.Create(nextToken.GetLocation()),
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
82additionalLocations: ImmutableArray.Create(token.GetLocation()),
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (1)
93DiagnosticHelper.Create(Descriptor, modifiers.First().GetLocation(), notificationOption, context.Options, additionalLocations: null, properties: null));
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (1)
39=> switchBlock.GetFirstToken().GetLocation();
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
113operatorToken.GetLocation(), 114additionalLocations: [operatorToken.GetLocation()],
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
110parenthesizedExpression.GetFirstToken().GetLocation(), 111parenthesizedExpression.GetLastToken().GetLocation());
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
191objectCreationExpression.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
160assignmentToken.GetLocation(), 180assignmentToken.GetLocation(), 193assignmentToken.GetLocation(),
src\Analyzers\Core\Analyzers\UseConditionalExpression\AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
57ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
96ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
129objectCreationExpression.GetFirstToken().GetLocation(),
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (2)
455new CodeGenerationContext(Token.GetLocation())); 501new CodeGenerationContext(Token.GetLocation())),
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
38contextLocation: _state.IdentifierToken.GetLocation())),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
77afterThisLocation: _state.IdentifierToken.GetLocation(),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
51return IdentifierToken.GetLocation();
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
65contextLocation: _state.IdentifierToken.GetLocation()));
Microsoft.CodeAnalysis.CSharp (53)
Binder\Binder.cs (2)
551diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code), token.GetLocation())); 556diagnostics.Add(new CSDiagnostic(new CSDiagnosticInfo(code, args), token.GetLocation()));
Binder\Binder.QueryTranslationState.cs (2)
75var result = new RangeVariableSymbol(name, binder.ContainingMemberOrLambda, identifier.GetLocation()); 84diagnostics.Add(ErrorCode.ERR_QueryDuplicateRangeVariable, identifier.GetLocation(), name);
Binder\Binder_Expressions.cs (2)
7629diagnostics.Add(ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), SyntaxFacts.GetText(operatorToken.Kind()), leftType); 7637diagnostics.Add(new CSDiagnostic(diagnosticInfo, operatorToken.GetLocation()));
Binder\Binder_Lambda.cs (1)
191paramsKeyword.GetLocation());
Binder\Binder_Patterns.cs (1)
882diagnostics.Add(ErrorCode.ERR_DesignatorBeneathPatternCombinator, identifier.GetLocation());
Binder\Binder_QueryErrors.cs (1)
210symbols), queryClause.GetFirstToken().GetLocation());
Binder\Binder_Symbols.cs (2)
706locations.Add(nameToken.GetLocation()); 2751=> CheckFeatureAvailability(syntax.SyntaxTree!, feature, diagnostics, syntax, static syntax => syntax.GetLocation(), forceWarning: forceWarning);
Binder\BindingDiagnosticBag.cs (2)
102return ReportUseSite(symbol, static token => token.GetLocation(), token); 165=> Add(code, syntax.GetLocation()!, args);
BoundTree\BoundTreeVisitors.cs (1)
192return syntax.GetFirstToken().GetLocation();
Errors\DiagnosticBagExtensions.cs (1)
78return !useSiteDiagnostics.IsNullOrEmpty() && diagnostics.Add(token.GetLocation(), useSiteDiagnostics);
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
48var location = questionToken.GetLocation();
Errors\MessageID.cs (2)
371static tuple => tuple.location ?? tuple.syntax.GetLocation(), 399static tuple => tuple.location ?? tuple.syntax.GetLocation(),
FlowAnalysis\NullableWalker.cs (4)
1124Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false"); 1279location = syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(); 1365var location = syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(); 1388ReportDiagnostic(ErrorCode.WRN_ShouldNotReturn, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation());
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
456TryGetWellKnownTypeMember<MethodSymbol>(syntax: null, WellKnownMember.System_IAsyncDisposable__DisposeAsync, out disposeMethod, location: awaitKeyword.GetLocation());
Symbols\AliasSymbol.cs (1)
75return new AliasSymbolFromResolvedTarget(targetSymbol, aliasToken.ValueText, containingSymbol, ImmutableArray.Create(aliasToken.GetLocation()), isExtern);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
61diagnostics.Add(ErrorCode.ERR_DupReturnTypeMod, modifier.GetLocation(), modifier.Text); 66diagnostics.Add(ErrorCode.ERR_InvalidFuncPointerReturnTypeModifier, modifier.GetLocation(), modifier.Text);
Symbols\Source\LocalFunctionSymbol.cs (1)
210diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation());
Symbols\Source\ModifierUtils.cs (4)
124diagnostics.Add(diagnosticInfo, modifier.GetLocation()); 136diagnostics.Add(ErrorCode.ERR_PartialMisplaced, partialToken.GetLocation()); 415modifier.GetLocation()); 453modifierToken.GetLocation(),
Symbols\Source\ParameterHelpers.cs (11)
147diagnostics.Add(ErrorCode.ERR_ThisInBadContext, thisKeyword.GetLocation()); 162diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 188diagnostics.Add(ErrorCode.ERR_IllegalRefParam, refnessKeyword.GetLocation()); 632diagnostics.Add(ErrorCode.ERR_DupParamMod, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind())); 637diagnostics.Add(ErrorCode.ERR_BadParameterModifiers, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind()), SyntaxFacts.GetText(otherModifierKind)); 642diagnostics.Add(ErrorCode.ERR_ParamsCantBeWithModifier, modifier.GetLocation(), SyntaxFacts.GetText(otherModifierKind)); 669diagnostics.Add(ErrorCode.ERR_BadThisParam, thisKeyword.GetLocation(), owner?.Name ?? ""); 674diagnostics.Add(ErrorCode.ERR_IllegalParams, paramsKeyword.GetLocation()); 749diagnostics.Add(ErrorCode.ERR_RefOutDefaultValue, refnessKeyword.GetLocation()); 755diagnostics.Add(ErrorCode.ERR_DefaultValueForParamsParameter, paramsKeyword.GetLocation()); 765diagnostics.Add(ErrorCode.ERR_DefaultValueForExtensionParameter, thisKeyword.GetLocation());
Symbols\Source\SourceEventSymbol.cs (1)
48_location = nameTokenSyntax.GetLocation();
Symbols\Source\SourceLocalSymbol.cs (1)
407=> _identifierToken.GetLocation();
Symbols\Source\SourceMemberContainerSymbol.cs (1)
1868ReportReservedTypeName(identifier?.Text, this.DeclaringCompilation, diagnostics.DiagnosticBag, identifier?.GetLocation() ?? Location.None);
Symbols\Source\SourceMemberFieldSymbol.cs (1)
83diagnostics.Add(ErrorCode.ERR_BadConstType, constToken.GetLocation(), type);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1320var linePositionZeroBased = referencedToken.GetLocation().GetLineSpan().StartLinePosition;
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
255thisKeyword.GetLocation(),
Symbols\Source\SourcePropertySymbol.cs (2)
622diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, arglistToken.GetLocation()); 633diagnostics.Add(ErrorCode.WRN_DefaultValueForUnconsumedLocation, paramNameToken.GetLocation(), paramNameToken.ValueText);
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
185target.GetLocation(), target.ToString(), (AttributeOwner.AllowedAttributeLocations & ~AttributeLocation.Method).ToDisplayString());
Syntax\SyntaxFactory.cs (1)
1649/// the <see cref="SyntaxToken.GetLocation"/> API may yield surprising results for
Syntax\SyntaxTokenParser.cs (1)
48/// the <see cref="SyntaxToken.GetLocation"/> API may yield surprising results for
Microsoft.CodeAnalysis.CSharp.CodeStyle (40)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
60name.GetLocation(),
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
112firstToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
63return root.Members.OfType<GlobalStatementSyntax>().First().GetFirstToken().GetLocation();
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
34return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
71location: switchStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
55localFunction.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
213return (nameToken.Value.GetLocation(), declaration.GetLocation());
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
122primaryLocation = typeDeclaration.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
80arrowExpressionClause.ArrowToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
61conditionalExpression.QuestionToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
85secondBrace.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveStatementPlacement\CSharpConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
44=> block.GetLastToken().GetLocation();
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
93colonToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
76statement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\PopulateSwitch\CSharpPopulateSwitchExpressionDiagnosticAnalyzer.cs (1)
16=> switchBlock.SwitchKeyword.GetLocation();
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
45((PostfixUnaryExpressionSyntax)left).OperatorToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
86return variableDeclarator.Identifier.GetLocation(); 106return forEachStatement.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (2)
196initializer.OpenBraceToken.GetLocation(), 211expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
206return new(memberAccessExpression.Name.Identifier.GetLocation(), localDeclarationStatement, creationExpression, matches.ToImmutable(), changesSemantics);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (2)
54memberAccess.Name.Identifier.GetLocation(), 64invocationExpression.ArgumentList.CloseParenToken.GetLocation());
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
57memberAccess.Name.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
102memberAccess.Name.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (2)
79objectCreationExpression.NewKeyword.GetLocation(), 89objectCreationExpression.ArgumentList.CloseParenToken.GetLocation());
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (2)
63expression.GetFirstToken().GetLocation(), 103expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
97coalesceExpression.OperatorToken.GetLocation(), 170ifStatement.IfKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
67variableDeclaration.Variables[0].Identifier.GetLocation(), 82forEachStatement.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
145localDeclaration.Declaration.Variables[0].Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
97isKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
124outermostUsing.UsingKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
122localDeclarationStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfDiagnosticAnalyzer.cs (1)
76invocation.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
133var location = syntaxNode.GetFirstToken().GetLocation();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
60var location = token.GetLocation();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
236=> context.ReportDiagnostic(Diagnostic.Create(s_syntaxDiagnosticDescriptor, context.Tree.GetRoot().GetFirstToken().GetLocation()));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
3720Assert.Equal(field1.GetLocation(), diagnostic.Location);
Diagnostics\GetDiagnosticsTests.cs (7)
1018PropertyDeclarationSyntax propertyDecl => propertyDecl.Identifier.GetLocation(), 1019IndexerDeclarationSyntax indexerDecl => indexerDecl.ThisKeyword.GetLocation(), 1020EventDeclarationSyntax eventDecl => eventDecl.Identifier.GetLocation(), 1028MethodDeclarationSyntax methodDecl => methodDecl.Identifier.GetLocation(), 1029OperatorDeclarationSyntax operatorDecl => operatorDecl.OperatorToken.GetLocation(), 1030ConstructorDeclarationSyntax constructorDecl => constructorDecl.Identifier.GetLocation(), 1031DestructorDeclarationSyntax destructorDecl => destructorDecl.Identifier.GetLocation(),
Microsoft.CodeAnalysis.CSharp.Features (39)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
60name.GetLocation(),
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
112firstToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
63return root.Members.OfType<GlobalStatementSyntax>().First().GetFirstToken().GetLocation();
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
34return isHidden ? methodDeclaration.GetLocation() : methodDeclaration.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
71location: switchStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
55localFunction.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
213return (nameToken.Value.GetLocation(), declaration.GetLocation());
src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
122primaryLocation = typeDeclaration.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (1)
80arrowExpressionClause.ArrowToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
61conditionalExpression.QuestionToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
85secondBrace.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveStatementPlacement\CSharpConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
44=> block.GetLastToken().GetLocation();
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
93colonToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (1)
76statement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\PopulateSwitch\CSharpPopulateSwitchExpressionDiagnosticAnalyzer.cs (1)
16=> switchBlock.SwitchKeyword.GetLocation();
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
45((PostfixUnaryExpressionSyntax)left).OperatorToken.GetLocation(),
src\Analyzers\CSharp\Analyzers\RemoveUnusedParametersAndValues\CSharpRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (2)
86return variableDeclarator.Identifier.GetLocation(); 106return forEachStatement.Identifier.GetLocation();
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (2)
196initializer.OpenBraceToken.GetLocation(), 211expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (1)
206return new(memberAccessExpression.Name.Identifier.GetLocation(), localDeclarationStatement, creationExpression, matches.ToImmutable(), changesSemantics);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (2)
54memberAccess.Name.Identifier.GetLocation(), 64invocationExpression.ArgumentList.CloseParenToken.GetLocation());
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
57memberAccess.Name.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
102memberAccess.Name.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (2)
79objectCreationExpression.NewKeyword.GetLocation(), 89objectCreationExpression.ArgumentList.CloseParenToken.GetLocation());
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (2)
63expression.GetFirstToken().GetLocation(), 103expression.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
97coalesceExpression.OperatorToken.GetLocation(), 170ifStatement.IfKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
67variableDeclaration.Variables[0].Identifier.GetLocation(), 82forEachStatement.Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
145localDeclaration.Declaration.Variables[0].Identifier.GetLocation(),
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
97isKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
124outermostUsing.UsingKeyword.GetLocation(),
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
122localDeclarationStatement.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfDiagnosticAnalyzer.cs (1)
76invocation.GetFirstToken().GetLocation(),
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
133var location = syntaxNode.GetFirstToken().GetLocation();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (12)
Diagnostics\Suppression\RemoveSuppressionTests.cs (1)
49var location = _reportDiagnosticsWithoutLocation ? Location.None : classDecl.Identifier.GetLocation();
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (1)
51var location = classDecl.Identifier.GetLocation();
Diagnostics\Suppression\SuppressionTests.cs (10)
709context.ReportDiagnostic(Diagnostic.Create(Decsciptor, classDecl.Identifier.GetLocation())); 819context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 882context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 1076context.ReportDiagnostic(Diagnostic.Create(Descriptor, classDecl.Identifier.GetLocation())); 1086context.ReportDiagnostic(Diagnostic.Create(Descriptor, method.Identifier.GetLocation())); 1091context.ReportDiagnostic(Diagnostic.Create(Descriptor, property.Identifier.GetLocation())); 1096context.ReportDiagnostic(Diagnostic.Create(Descriptor, field.Declaration.Variables.First().Identifier.GetLocation())); 1101context.ReportDiagnostic(Diagnostic.Create(Descriptor, e.Identifier.GetLocation())); 2070context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 2080context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation()));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
350Assert.Equal(localType.Locations[0], anonObjectCreation.NewKeyword.GetLocation());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Syntax\SyntaxFactoryTests.cs (5)
425Assert.Equal(Location.None, literal.GetLocation()); 439Assert.Equal(Location.None, literal.GetLocation()); 453Assert.Equal(expectedLocation, expression.Token.GetLocation()); 467Assert.Equal(expectedLocation, expression.Token.GetLocation()); 477Assert.Equal(Location.None, token.GetLocation());
Syntax\SyntaxNodeTests.cs (1)
2082var tokenLocation = method.Identifier.GetLocation();
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
Rename\CSharpRenameRewriterLanguageService.cs (5)
420if (_renameRenamableSymbolDeclaration != null && _renamableDeclarationLocation == token.GetLocation()) 817conflicts.AddRange(visitor.ConflictingTokens.Select(t => reverseMappedLocations[t.GetLocation()])); 831conflicts.AddRange(visitor.ConflictingTokens.Select(t => reverseMappedLocations[t.GetLocation()])); 841conflicts.AddRange(visitor.ConflictingTokens.Select(t => reverseMappedLocations[t.GetLocation()])); 903conflicts.Add(reverseMappedLocations[typeParameter.Identifier.GetLocation()]);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
60var location = token.GetLocation();
Microsoft.CodeAnalysis.Features (24)
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionAnalyzer.cs (1)
96token.GetLocation(),
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
148operatorToken.GetLocation(),
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
147node.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
112additionalLocations: ImmutableArray.Create(nextToken.GetLocation()),
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (1)
82additionalLocations: ImmutableArray.Create(token.GetLocation()),
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (1)
93DiagnosticHelper.Create(Descriptor, modifiers.First().GetLocation(), notificationOption, context.Options, additionalLocations: null, properties: null));
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (1)
39=> switchBlock.GetFirstToken().GetLocation();
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (2)
113operatorToken.GetLocation(), 114additionalLocations: [operatorToken.GetLocation()],
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (2)
110parenthesizedExpression.GetFirstToken().GetLocation(), 111parenthesizedExpression.GetLastToken().GetLocation());
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
191objectCreationExpression.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
160assignmentToken.GetLocation(), 180assignmentToken.GetLocation(), 193assignmentToken.GetLocation(),
src\Analyzers\Core\Analyzers\UseConditionalExpression\AbstractUseConditionalExpressionDiagnosticAnalyzer.cs (1)
57ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
96ifStatement.GetFirstToken().GetLocation(),
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
129objectCreationExpression.GetFirstToken().GetLocation(),
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (2)
455new CodeGenerationContext(Token.GetLocation())); 501new CodeGenerationContext(Token.GetLocation())),
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
38contextLocation: _state.IdentifierToken.GetLocation())),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
77afterThisLocation: _state.IdentifierToken.GetLocation(),
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
51return IdentifierToken.GetLocation();
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
65contextLocation: _state.IdentifierToken.GetLocation()));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Diagnostics\NonLocalDiagnosticTests.cs (2)
94var diagnostic = Diagnostic.Create(NonLocalDescriptor, root.GetFirstToken().GetLocation()); 105var diagnostic = Diagnostic.Create(CompilationEndDescriptor, root.GetFirstToken().GetLocation());
Microsoft.CodeAnalysis.Test.Utilities (2)
Diagnostics\CommonDiagnosticAnalyzers.cs (2)
1665ReportDiagnosticsCore(addDiagnostic, tree.GetRoot().GetLastToken().GetLocation(), tree.FilePath); 2603context.ReportDiagnostic(Diagnostic.Create(Descriptor, variable.Identifier.GetLocation()));
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (1)
1400var location = token.GetLocation();
Microsoft.CodeAnalysis.VisualBasic (24)
Binding\Binder_AnonymousTypes.vb (1)
281typeLocationToken.GetLocation(),
Binding\Binder_Delegates.vb (2)
926Dim location = token.GetLocation() 933Dim location = token.GetLocation()
Binding\Binder_Query.vb (1)
3242syntax.QueryClauseKeywordOrRangeVariableIdentifier.GetLocation(),
Binding\Binder_Symbols.vb (1)
645locations.Add(nameSyntax.GetLocation)
Binding\Binder_Utils.vb (5)
227privateProtectedToken.GetLocation(), 927diagnostics.Add(ERRID.ERR_ByRefIllegal1, token.GetLocation(), container.GetKindText()) 932diagnostics.Add(ERRID.ERR_ParamArrayIllegal1, token.GetLocation(), container.GetKindText()) 937diagnostics.Add(ERRID.ERR_OptionalIllegal1, token.GetLocation(), container.GetKindText()) 990Dim location = token.GetLocation()
Binding\BindingDiagnosticBag.vb (1)
95Return ReportUseSite(symbol, token.GetLocation())
BoundTree\BoundTreeVisitor.vb (1)
168Return syntax.GetFirstToken().GetLocation()
BoundTree\GroupTypeInferenceLambda.vb (2)
25Syntax.QueryClauseKeywordOrRangeVariableIdentifier.GetLocation(), 27Syntax.QueryClauseKeywordOrRangeVariableIdentifier.GetLocation(),
Symbols\Source\CustomEventAccessorSymbol.vb (3)
256Dim location = token.GetLocation() 262Dim location = token.GetLocation() 273Dim location = token.GetLocation()
Symbols\Source\LocalSymbol.vb (1)
594Return _identifierToken.GetLocation()
Symbols\Source\RangeVariableSymbol.vb (1)
185Return ImmutableArray.Create(Of Location)(_identifierToken.GetLocation())
Symbols\Source\SourceLabelSymbol.vb (1)
56Return ImmutableArray.Create(Of Location)(_labelName.GetLocation())
Symbols\Source\SourceNamedTypeSymbol.vb (1)
1447GetTypeIdentifierToken(syntax).GetLocation())
Symbols\Source\SourcePropertyAccessorSymbol.vb (1)
466Dim location = token.GetLocation()
Symbols\Source\SourcePropertySymbol.vb (1)
247Dim location = identifier.GetLocation()
Syntax\SyntaxNodeFactories.vb (1)
142''' the <see cref="SyntaxToken.GetLocation"/> API may yield surprising results for
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (4)
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiersDiagnosticAnalyzer.vb (1)
68name.GetLocation(),
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryByVal\VisualBasicRemoveUnnecessaryByValDiagnosticAnalyzer.vb (1)
33syntaxContext.ReportDiagnostic(Diagnostic.Create(Descriptor, modifier.GetLocation(), additionalLocations:={parameterSyntax.GetLocation()}))
src\Analyzers\VisualBasic\Analyzers\UseIsNotExpression\VisualBasicUseIsNotDiagnosticAnalyzer.vb (1)
73isKeyword.GetLocation(),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
65Dim location = token.GetLocation()
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
Binders\PlaceholderLocalBinder.vb (1)
84diagnostics.Add(ERRID.ERR_IllegalChar, identifier.GetLocation())
Microsoft.CodeAnalysis.VisualBasic.Features (4)
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.MoveToLineCodeAction.vb (1)
36Dim lineToMove = _token.GetLocation().GetLineSpan().StartLinePosition.Line
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiersDiagnosticAnalyzer.vb (1)
68name.GetLocation(),
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryByVal\VisualBasicRemoveUnnecessaryByValDiagnosticAnalyzer.vb (1)
33syntaxContext.ReportDiagnostic(Diagnostic.Create(Descriptor, modifier.GetLocation(), additionalLocations:={parameterSyntax.GetLocation()}))
src\Analyzers\VisualBasic\Analyzers\UseIsNotExpression\VisualBasicUseIsNotDiagnosticAnalyzer.vb (1)
73isKeyword.GetLocation(),
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (12)
Diagnostics\Suppression\SuppressionTests.vb (12)
711context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 786context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 830context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 896context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 1018context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 1028context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation())) 1033context.ReportDiagnostic(Diagnostic.Create(_descriptor, p.Identifier.GetLocation())) 1043context.ReportDiagnostic(Diagnostic.Create(_descriptor, e.Identifier.GetLocation())) 1734context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 1744context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation())) 1749context.ReportDiagnostic(Diagnostic.Create(_descriptor, p.Identifier.GetLocation())) 1759context.ReportDiagnostic(Diagnostic.Create(_descriptor, e.Identifier.GetLocation()))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.vb (1)
366location = DirectCast(context.Node, ClassBlockSyntax).BlockStatement.Identifier.GetLocation
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (15)
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (15)
153Assert.Equal(localType.Locations(0), anonObjectCreation.NewKeyword.GetLocation()) 252tree.GetRoot().FindToken(select1).GetLocation, 255tree.GetRoot().FindToken(x2 - 2).GetLocation(), 256tree.GetRoot().FindToken(y4 - 2).GetLocation()) 262tree.GetRoot().FindToken(select2).GetLocation, 265tree.GetRoot().FindToken(x5 - 2).GetLocation(), 266tree.GetRoot().FindToken(y5 - 2).GetLocation()) 326tree.GetRoot().FindToken(x1 - 2).GetLocation(), 327tree.GetRoot().FindToken(y1 - 2).GetLocation()) 336tree.GetRoot().FindToken(x2 - 2).GetLocation(), 337tree.GetRoot().FindToken(y2 - 2).GetLocation()) 393tree.GetRoot().FindToken(x1 - 2).GetLocation(), 394tree.GetRoot().FindToken(y1 - 2).GetLocation()) 404tree.GetRoot().FindToken(x2 - 2).GetLocation(), 405tree.GetRoot().FindToken(y2 - 2).GetLocation())
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
382If Me._renameRenamableSymbolDeclaration IsNot Nothing AndAlso _renamableDeclarationLocation = token.GetLocation() Then
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
65Dim location = token.GetLocation()
Microsoft.CodeAnalysis.Workspaces (6)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (4)
210token.GetLocation(), 412var location = node.GetFirstToken().GetLocation(); 529var location = node.GetFirstToken().GetLocation(); 564var location = node.GetFirstToken().GetLocation();
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
233var containingStringLocation = token.GetLocation();
FindSymbols\FindReferences\Finders\OrdinaryMethodReferenceFinder.cs (1)
168var location = node.GetFirstToken().GetLocation();
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
BatchFixAllProviderTests.cs (1)
74context.ReportDiagnostic(Diagnostic.Create(Descriptor, node.Token.GetLocation()));
Microsoft.Extensions.Logging.Generators (3)
LoggerMessageGenerator.Parser.cs (3)
256Diag(DiagnosticDescriptors.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString()); 264Diag(DiagnosticDescriptors.InvalidLoggingMethodName, method.Identifier.GetLocation()); 278Diag(DiagnosticDescriptors.LoggingMethodIsGeneric, method.Identifier.GetLocation());
Microsoft.Gen.ContextualOptions (4)
Parser.cs (4)
32.Select(modifier => Diagnostic.Create(DiagDescriptors.ContextCannotBeStatic, modifier.GetLocation(), type.Name))); 46.Select(modifier => Diagnostic.Create(DiagDescriptors.ContextCannotBeRefLike, modifier.GetLocation(), type.Name))); 57type.Definitions.Select(def => Diagnostic.Create(DiagDescriptors.ContextMustBePartial, def.Identifier.GetLocation(), type.Name))); 68type.Definitions.Select(def => Diagnostic.Create(DiagDescriptors.ContextDoesNotHaveValidProperties, def.Identifier.GetLocation(), type.Name)));
Microsoft.Gen.Logging (5)
Parsing\Parser.cs (5)
218Diag(DiagDescriptors.LoggingMethodShouldBeStatic, method.Identifier.GetLocation()); 234Diag(DiagDescriptors.MissingLoggerMember, method.Identifier.GetLocation(), typeDec.Identifier.Text); 258Diag(DiagDescriptors.EmptyLoggingMethod, method.Identifier.GetLocation(), methodSymbol.Name); 390Diag(DiagDescriptors.MalformedFormatStrings, method.Identifier.GetLocation(), method.Identifier.ToString()); 416Diag(DiagDescriptors.LoggingMethodMustBePartial, method.Identifier.GetLocation());
Microsoft.Interop.ComInterfaceGenerator (23)
ComClassInfo.cs (3)
30return DiagnosticOr<ComClassInfo>.From(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, syntax.Identifier.GetLocation())); 38syntax.Identifier.GetLocation(), 59syntax.Identifier.GetLocation(),
ComInterfaceInfo.cs (14)
58return DiagnosticOrInterfaceInfo.From(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, syntax.Identifier.GetLocation())); 66syntax.Identifier.GetLocation(), 77syntax.Identifier.GetLocation(), 107syntax.Identifier.GetLocation()), 126syntax.Identifier.GetLocation(), 183syntax.Identifier.GetLocation(), 208syntax.Identifier.GetLocation(), 217syntax.Identifier.GetLocation(), 227syntax.Identifier.GetLocation(), 242syntax.Identifier.GetLocation(), 264syntax.Identifier.GetLocation(), 278syntax.Identifier.GetLocation(), 311syntax.Identifier.GetLocation(), 353syntax.Identifier.GetLocation(),
ComMethodInfo.cs (2)
74return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, comMethodDeclaringSyntax.Identifier.GetLocation(), method.Name); 80return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, comMethodDeclaringSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
VtableIndexStubGenerator.cs (4)
400return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 408return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 415return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString()); 421return Diagnostic.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute, methodSyntax.Identifier.GetLocation(), method.Name);
Microsoft.Interop.JavaScript.JSImportGenerator (6)
JSExportGenerator.cs (3)
344return Diagnostic.Create(GeneratorDiagnostics.InvalidExportAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 352return Diagnostic.Create(GeneratorDiagnostics.InvalidExportAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 359return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
JSImportGenerator.cs (3)
223return Diagnostic.Create(GeneratorDiagnostics.InvalidImportAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 231return Diagnostic.Create(GeneratorDiagnostics.InvalidImportAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, typeDecl.Identifier); 238return Diagnostic.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.LibraryImportGenerator (3)
LibraryImportGenerator.cs (3)
550return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 556return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, nonPartialIdentifier); 562return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.LibraryImportGenerator.Downlevel (3)
DownlevelLibraryImportGenerator.cs (3)
420return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodSignature, methodSyntax.Identifier.GetLocation(), method.Name); 426return DiagnosticInfo.Create(GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, methodSyntax.Identifier.GetLocation(), method.Name, nonPartialIdentifier); 432return DiagnosticInfo.Create(GeneratorDiagnostics.ReturnConfigurationNotSupported, methodSyntax.Identifier.GetLocation(), "ref return", method.ToDisplayString());
Microsoft.Interop.SourceGeneration (2)
MethodSignatureDiagnosticLocations.cs (2)
48: this(syntax.Identifier.Text, syntax.ParameterList.Parameters.Select(p => p.Identifier.GetLocation()).ToImmutableArray(), syntax.Identifier.GetLocation())
Microsoft.ML.InternalCodeAnalyzer (3)
NameAnalyzer.cs (3)
38return Diagnostic.Create(rule, identifier.GetLocation(), props, text); 42return Diagnostic.Create(rule, identifier.GetLocation(), props, newArgs); 172var diagnostic = Diagnostic.Create(PrivateFieldName.Rule, identifier.GetLocation(), name);