56 references to GetDeclaredSymbol
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
45internal Func<SemanticModel, BaseMethodDeclarationSyntax, CancellationToken, IMethodSymbol?> GetDeclaredSymbol = (sm, m, t) => sm.GetDeclaredSymbol(m, t);
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
196var methodSymbol = semanticModel.GetDeclaredSymbol(methodSyntax, context.CancellationToken);
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (1)
115var methodSymbol = semanticModel.GetDeclaredSymbol(methodDeclarationSyntax, cancellationToken);
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixAction.cs (1)
133var method = semanticModel.GetDeclaredSymbol(methodSyntax, cancellationToken);
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Parser.cs (1)
209var registerCallbackProviderMethodSymbol = (IMethodSymbol)registerCallbackProviderSemanticModel.GetDeclaredSymbol(methodDeclarationSyntax);
HubServerProxyGenerator.Parser.cs (1)
198var getProxyMethodSymbol = (IMethodSymbol)getProxySemanticModel.GetDeclaredSymbol(methodDeclarationSyntax);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
81var thisMethod = semanticModel.GetDeclaredSymbol(methodDeclaration);
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
60var method = semanticModel.GetDeclaredSymbol(declaration);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
464return semanticModel.GetDeclaredSymbol(syntax, cancellationToken)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
10690var returnType = model.GetDeclaredSymbol(method).ReturnType;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Attributes\AttributeTests.cs (1)
710var m0 = semanticModel.GetDeclaredSymbol(root.DescendantNodes().OfType<MethodDeclarationSyntax>().Last());
OverloadResolutionPriorityTests.cs (1)
981var ctor = model.GetDeclaredSymbol(secondCtor)!.GetSymbol<SourceConstructorSymbol>();
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
501var symbol = model.GetDeclaredSymbol(node);
Microsoft.CodeAnalysis.CSharp.Features (4)
ExtractMethod\CSharpSelectionResult.StatementResult.cs (1)
86return semanticModel.GetDeclaredSymbol(methodDeclaration) is not IMethodSymbol method
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
81var thisMethod = semanticModel.GetDeclaredSymbol(methodDeclaration);
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
60var method = semanticModel.GetDeclaredSymbol(declaration);
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (1)
63methodSymbol = semanticModel.GetDeclaredSymbol(methodDeclaration, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\ExpressionBodiedMemberTests.cs (1)
46var gooDef = model.GetDeclaredSymbol(node).GetSymbol<SourceOrdinaryMethodSymbol>();
Semantics\NativeIntegerTests.cs (1)
3639var method = model.GetDeclaredSymbol(nodes.OfType<MethodDeclarationSyntax>().Single());
Semantics\NullableReferenceTypesTests.cs (1)
157635var method1 = model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single());
Semantics\RecordStructTests.cs (3)
555var type = model.GetDeclaredSymbol(method)!.ReturnType; 575var type = model.GetDeclaredSymbol(method)!.ReturnType; 597var type = model.GetDeclaredSymbol(method)!.GetParameterType(0);
Semantics\RefFieldTests.cs (1)
28875symbol = model.GetDeclaredSymbol(constructorSyntax);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (25)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (11)
280var methodSymbol = model.GetDeclaredSymbol(methodDecl); 974var mSymbol = model.GetDeclaredSymbol(memDecl) as IMethodSymbol; 981mSymbol = model.GetDeclaredSymbol(memDecl) as IMethodSymbol; 2852var explicitMethodSymbol = (IMethodSymbol)model.GetDeclaredSymbol(explicitMethodNode); 2975var dsyma1 = model.GetDeclaredSymbol(node1.Members[0] as MethodDeclarationSyntax); 2994var dsymc1 = model.GetDeclaredSymbol(node3.Members[0] as MethodDeclarationSyntax); 2995var dsymc2 = model.GetDeclaredSymbol(node3.Members[1] as MethodDeclarationSyntax); 2996var dsymc3 = model.GetDeclaredSymbol(node3.Members[2] as MethodDeclarationSyntax); 4442var declaredSymbol = model.GetDeclaredSymbol(conversionDecl); 4473var declaredSymbol = model.GetDeclaredSymbol(conversionDecl); 4504var declaredSymbol = model.GetDeclaredSymbol(operatorDecl);
Symbols\DestructorTests.cs (1)
409var declaredSymbol = model.GetDeclaredSymbol(destructorDecl);
Symbols\ImplicitClassTests.cs (1)
120Assert.Equal("Goo", model.GetDeclaredSymbol(methodDecl).Name);
Symbols\Source\MethodTests.cs (4)
2542var partialDef = model.GetDeclaredSymbol(methods[0]); 2545var partialImpl = model.GetDeclaredSymbol(methods[1]); 2575var partialDef = model.GetDeclaredSymbol(methods[0]); 2581var partialImpl = model.GetDeclaredSymbol(methods[1]);
Symbols\Source\NullablePublicAPITests.cs (1)
3508var mSymbol = model.GetDeclaredSymbol(mDeclaration);
Symbols\Source\UpdatedContainingSymbolAndNullableAnntotationTests.cs (1)
41Symbol m2 = model.GetDeclaredSymbol(root.DescendantNodes().OfType<MethodDeclarationSyntax>().ElementAt(1)).GetSymbol();
Symbols\StaticAbstractMembersInInterfacesTests.cs (5)
19565var declaredSymbol = model.GetDeclaredSymbol(node.FirstAncestorOrSelf<OperatorDeclarationSyntax>()); 19648var declaredSymbol = model.GetDeclaredSymbol(node.FirstAncestorOrSelf<OperatorDeclarationSyntax>()); 19740var declaredSymbol = model.GetDeclaredSymbol(node.FirstAncestorOrSelf<OperatorDeclarationSyntax>()); 19829var declaredSymbol = model.GetDeclaredSymbol(node.FirstAncestorOrSelf<OperatorDeclarationSyntax>()); 28778var declaredSymbol = model.GetDeclaredSymbol(node.FirstAncestorOrSelf<ConversionOperatorDeclarationSyntax>());
Symbols\TypeTests.cs (1)
1721var compType = (model.GetDeclaredSymbol(mnode) as IMethodSymbol).Parameters[0].Type;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
468var method = model.GetDeclaredSymbol(methodSyntax);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
464return semanticModel.GetDeclaredSymbol(syntax, cancellationToken)
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
103IMethodSymbol logMethodSymbol = sm.GetDeclaredSymbol(method, _cancellationToken)!;
Microsoft.Gen.Logging (1)
Parsing\Parser.cs (1)
85var methodSymbol = sm.GetDeclaredSymbol(method, _cancellationToken)!;
Microsoft.Gen.Metrics (1)
Parser.cs (1)
85IMethodSymbol? methodSymbol = semanticModel.GetDeclaredSymbol(methodSyntax, _cancellationToken);
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
85IMethodSymbol? methodSymbol = semanticModel.GetDeclaredSymbol(methodSyntax, _cancellationToken);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\MethodXml\MethodXmlBuilder.cs (1)
611var symbol = semanticModel.GetDeclaredSymbol(methodDeclaration);