377 references to GetSymbolInfo
ILLink.CodeFixProvider (1)
BaseAttributeCodeFixProvider.cs (1)
62 if (model.GetSymbolInfo (targetNode, cancellationToken).Symbol is not { } targetSymbol)
Microsoft.AspNetCore.App.Analyzers (6)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
393var parameterTypeSymbol = semanticModel.GetSymbolInfo(token.Parent!, cancellationToken).GetAnySymbol();
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (2)
245var symbol = semanticModel.GetSymbolInfo(left, cancellationToken).Symbol; 397var symbolInfo = semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken);
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (2)
243var symbols = GetBestOrAllSymbols(semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken)); 335var delegateSymbolInfo = semanticModel.GetSymbolInfo(syntaxNode, cancellationToken);
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (1)
99.Where(i => semanticModel.GetSymbolInfo(i) is var symbolInfo && SymbolEqualityComparer.Default.Equals(symbolInfo.Symbol ?? symbolInfo.CandidateSymbols.FirstOrDefault(), matchingParameter));
Microsoft.AspNetCore.App.CodeFixes (1)
Dependencies\AddPackageFixer.cs (1)
66var symbol = semanticModel.GetSymbolInfo(((MemberAccessExpressionSyntax)node.Parent).Expression).Symbol;
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (4)
HubClientProxyGenerator.Parser.cs (2)
39var attributeSymbol = ModelExtensions.GetSymbolInfo(context.SemanticModel, attributeSyntax).Symbol; 149if (ModelExtensions.GetSymbolInfo(context.SemanticModel, memberAccessExpressionSyntax).Symbol is not IMethodSymbol
HubServerProxyGenerator.Parser.cs (2)
139if (ModelExtensions.GetSymbolInfo(context.SemanticModel, memberAccessExpressionSyntax).Symbol is not IMethodSymbol 237if (ModelExtensions.GetSymbolInfo(argumentModel, proxyType).Symbol is not ITypeSymbol { IsAbstract: true } symbol)
Microsoft.CodeAnalysis.CodeStyle (33)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
454var symbolInfo = nameofArgument.SemanticModel!.GetSymbolInfo(nameofArgument.Syntax, operationContext.CancellationToken);
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
243if (semanticModel.GetSymbolInfo(identifierName, cancellationToken).Symbol is not IFieldSymbol field)
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
176var symbol = semanticModel.GetSymbolInfo(identifier, cancellationToken).GetAnySymbol();
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
176var initializedSymbol = semanticModel.GetSymbolInfo(left, cancellationToken).GetAnySymbol();
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (2)
121SemanticModel.GetSymbolInfo(subExpression, cancellationToken).GetAnySymbol())) 236var method = this.SemanticModel.GetSymbolInfo(memberAccess, cancellationToken).GetAnySymbol() as IMethodSymbol;
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (1)
102var symbolInfo = semanticModel.GetSymbolInfo(expr, cancellationToken);
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
101var symbol = semanticModel.GetSymbolInfo(invocation, cancellationToken).Symbol;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (2)
177var memberSymbol = semanticModel.GetSymbolInfo(whenPartToCheck, cancellationToken).GetAnySymbol(); 320var symbol = semanticModel.GetSymbolInfo(invocation, cancellationToken).Symbol;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
79var memberSymbol = semanticModel.GetSymbolInfo(memberAccess, cancellationToken).GetAnySymbol();
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
115var leftSymbol = this.SemanticModel.GetSymbolInfo(leftMemberAccess, cancellationToken).GetAnySymbol();
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
105var symbolInfo = context.SemanticModel.GetSymbolInfo(expression, context.CancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
62var info1 = semanticModel1.GetSymbolInfo(node1); 63var info2 = semanticModel2.GetSymbolInfo(node2);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
33=> semanticModel.GetSymbolInfo(token.Parent!, cancellationToken); 243var symbolInfo = semanticModel.GetSymbolInfo(expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (1)
29var symbolInfo = semanticModel.GetSymbolInfo(innerBinary);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs (1)
57var symbol = semanticModel.GetSymbolInfo(node, reader.CancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
733var info = semanticModel.GetSymbolInfo(node, CancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (13)
323var originalSymbolInfo = this.OriginalSemanticModel.GetSymbolInfo(originalNode); 324var newSymbolInfo = this.SpeculativeSemanticModel.GetSymbolInfo(newNode); 678var originalIsStaticAccess = IsStaticAccess(OriginalSemanticModel.GetSymbolInfo(originalExpression, CancellationToken).Symbol); 679var replacedIsStaticAccess = IsStaticAccess(this.SpeculativeSemanticModel.GetSymbolInfo(newExpression, CancellationToken).Symbol); 735var originalExpressionSymbol = this.OriginalSemanticModel.GetSymbolInfo(currentOriginalNode).Symbol; 736var replacedExpressionSymbol = this.SpeculativeSemanticModel.GetSymbolInfo(currentReplacedNode).Symbol; 766var attributeSym = this.OriginalSemanticModel.GetSymbolInfo(attribute).Symbol; 767var newAttributeSym = this.SpeculativeSemanticModel.GetSymbolInfo(newAttribute).Symbol; 860var symbol = this.OriginalSemanticModel.GetSymbolInfo(type).Symbol; 865newSymbol = this.SpeculativeSemanticModel.GetSymbolInfo(newType, CancellationToken).Symbol; 891var originalSymbolInfo = OriginalSemanticModel.GetSymbolInfo(expression); 897var newSymbolInfo = this.SpeculativeSemanticModel.GetSymbolInfo(node: newExpression); 1054var receiverSymbol = semanticModel.GetSymbolInfo(receiver).GetAnySymbol();
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
49var symbolInfo = semanticModel.GetSymbolInfo(invocationNode, cancellationToken);
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
43var symbolInfo = semanticModel.GetSymbolInfo(diagnosticNode, cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
187var semanticInfo = semanticModel.GetSymbolInfo(expression, cancellationToken);
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
90var symbol = semanticModel.GetDeclaredSymbol(node, cancellationToken) ?? semanticModel.GetSymbolInfo(node, cancellationToken).GetAnySymbol();
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
58var methodSymbol = (IMethodSymbol?)(semanticModel.GetDeclaredSymbol(node, cancellationToken) ?? semanticModel.GetSymbolInfo(node, cancellationToken).GetAnySymbol());
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
105=> semanticModel.GetSymbolInfo(node, cancellationToken).Symbol as IMethodSymbol ??
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
39if (semanticModel.GetSymbolInfo(node, cancellationToken).Symbol is INamedTypeSymbol type &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
87var symbolInfo = semanticModel.GetSymbolInfo(expression); 102var expressionInfo = semanticModel.GetSymbolInfo(expression);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\Simplifiers\AbstractMemberAccessExpressionSimplifier.cs (1)
54var symbolInfo = semanticModel.GetSymbolInfo(memberAccessExpression, cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (2)
247var method1 = semanticModel1.GetSymbolInfo(node1, cancellationToken).Symbol as IMethodSymbol; 248var method2 = semanticModel2.GetSymbolInfo(node2, cancellationToken).Symbol as IMethodSymbol;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
52var symbolInfo = semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
978var symbol = semanticModel.GetSymbolInfo(current, cancellationToken).Symbol ?? semanticModel.GetDeclaredSymbol(current, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
443if (semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken).Symbol is IMethodSymbol member && index < member.Parameters.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
802var info = semanticModel.GetSymbolInfo(current, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (3)
292/// cref="ModelExtensions.GetSymbolInfo(SemanticModel, SyntaxNode, CancellationToken)"/>, but sometimes employs 352var symbol = semanticModel.GetSymbolInfo(node, cancellationToken).GetAnySymbol(); 365: semanticModel.GetSymbolInfo(node, cancellationToken).GetBestOrAllSymbols();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (4)
1137var oldSymbolInfo = originalSemanticModel.GetSymbolInfo(currentOld, cancellationToken); 1142var newSymbolInfo = rewrittenSemanticModel.GetSymbolInfo(currentNew, cancellationToken); 1198var oldSymbolInfo = originalSemanticModel.GetSymbolInfo(currentOld, cancellationToken).Symbol; 1199var newSymbolInfo = rewrittenSemanticModel.GetSymbolInfo(currentNew, cancellationToken).Symbol;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
285if (semanticModel.GetSymbolInfo(n, cancellationToken).Symbol.IsKind(SymbolKind.Local) == true)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (1)
71if (semanticModel.GetSymbolInfo(invocationExpression, cancellationToken).Symbol is not IMethodSymbol methodSymbol)
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
349var previousSymbol = semanticModel.GetSymbolInfo(nodeToReplace, cancellationToken).Symbol;
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
320var symbolInfo = semanticModel.GetSymbolInfo(eventHookupExpression.Left, cancellationToken);
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
195return semanticModel.GetSymbolInfo(parentToken.Left, cancellationToken).Symbol as IEventSymbol;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
51var symbol = context.SemanticModel.GetSymbolInfo(node).Symbol;
SymbolKey\SymbolKeyTestBase.cs (2)
62var syminfo = model.GetSymbolInfo(node); 405var sinfo = model.GetSymbolInfo(expr);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
CodeGen\CodeGenDeconstructTests.cs (9)
3138Assert.Null(model.GetSymbolInfo(lhsNested).Symbol); 3192Assert.Null(model.GetSymbolInfo(x34).Symbol); 5858Assert.Null(model.GetSymbolInfo(x1).Symbol); 5865Assert.Null(model.GetSymbolInfo(x3).Symbol); 5910Assert.Null(model.GetSymbolInfo(discard1).Symbol); 5918Assert.Null(model.GetSymbolInfo(discard2).Symbol); 6977Assert.True(model.GetSymbolInfo(discard1).IsEmpty); 6986Assert.True(model.GetSymbolInfo(discard2).IsEmpty); 7004Assert.True(model.GetSymbolInfo(discard4).IsEmpty);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\NumericIntPtrTests.cs (2)
6622var symbolInfo = model.GetSymbolInfo(expr); 6854var symbolInfo = model.GetSymbolInfo(expr);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (89)
Semantics\InlineArrayTests.cs (7)
2526symbolInfo = model.GetSymbolInfo(access); 6217symbolInfo = model.GetSymbolInfo(access); 8843var symbolInfo = model.GetSymbolInfo(m3); 8853symbolInfo = model.GetSymbolInfo(access); 9211var symbolInfo = model.GetSymbolInfo(m3.Parent); 10565symbolInfo = model.GetSymbolInfo(access); 11309symbolInfo = model.GetSymbolInfo(access);
Semantics\OutVarTests.cs (9)
32981Assert.Null(model.GetSymbolInfo(discard1).Symbol); 32990Assert.Null(model.GetSymbolInfo(discard2).Symbol); 33065Assert.Null(model.GetSymbolInfo(discard1).Symbol); 33081Assert.Null(model.GetSymbolInfo(discard2).Symbol); 33137Assert.Null(model.GetSymbolInfo(discard1).Symbol); 33179Assert.Null(model.GetSymbolInfo(discard1).Symbol); 33195Assert.Null(model.GetSymbolInfo(discard2).Symbol); 33243Assert.Null(model.GetSymbolInfo(discard1).Symbol); 33259Assert.Null(model.GetSymbolInfo(discard2).Symbol);
Semantics\PatternMatchingTestBase.cs (3)
296Assert.Null(model.GetSymbolInfo(designation).Symbol); 297Assert.Null(model.GetSymbolInfo(designation).Symbol); 380Assert.Null(model.GetSymbolInfo(designation).Symbol);
Semantics\PatternMatchingTests.cs (2)
4300Assert.Null(model.GetSymbolInfo(discard2).Symbol); 4303Assert.Null(model.GetSymbolInfo(declaration2).Symbol);
Semantics\PatternMatchingTests3.cs (30)
52AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 53AssertEmpty(model.GetSymbolInfo(subpatterns[0].NameColon)); 59AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 60AssertEmpty(model.GetSymbolInfo(subpatterns[1].NameColon)); 112AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 113AssertEmpty(model.GetSymbolInfo(subpatterns[0].NameColon)); 122AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 123AssertEmpty(model.GetSymbolInfo(subpatterns[1].NameColon)); 163AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 164AssertEmpty(model.GetSymbolInfo(subpatterns[0].NameColon)); 171AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 172AssertEmpty(model.GetSymbolInfo(subpatterns[1].NameColon)); 208AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 209AssertEmpty(model.GetSymbolInfo(subpatterns[0].NameColon)); 216AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 217AssertEmpty(model.GetSymbolInfo(subpatterns[1].NameColon)); 261AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 262AssertEmpty(model.GetSymbolInfo(subpatterns[0].NameColon)); 269AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 270AssertEmpty(model.GetSymbolInfo(subpatterns[1].NameColon)); 302AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 303AssertEmpty(model.GetSymbolInfo(subpatterns[0].NameColon)); 310AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 311AssertEmpty(model.GetSymbolInfo(subpatterns[1].NameColon)); 349AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 350AssertEmpty(model.GetSymbolInfo(subpatterns[0].NameColon)); 357AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 358AssertEmpty(model.GetSymbolInfo(subpatterns[1].NameColon)); 4112AssertEmpty(model.GetSymbolInfo(pattern)); 4339AssertEmpty(model.GetSymbolInfo(pattern));
Semantics\PatternMatchingTests4.cs (1)
1014var symbolInfo = model.GetSymbolInfo(dpcs);
Semantics\PatternMatchingTests5.cs (16)
1109AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 1110AssertEmpty(model.GetSymbolInfo(subpatterns[0].ExpressionColon)); 1126AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 1127AssertEmpty(model.GetSymbolInfo(subpatterns[1].ExpressionColon)); 1189AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 1190AssertEmpty(model.GetSymbolInfo(subpatterns[0].ExpressionColon)); 1199AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 1200AssertEmpty(model.GetSymbolInfo(subpatterns[1].ExpressionColon)); 1240AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 1241AssertEmpty(model.GetSymbolInfo(subpatterns[0].ExpressionColon)); 1248AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 1249AssertEmpty(model.GetSymbolInfo(subpatterns[1].ExpressionColon)); 1292AssertEmpty(model.GetSymbolInfo(subpatterns[0])); 1293AssertEmpty(model.GetSymbolInfo(subpatterns[0].ExpressionColon)); 1318AssertEmpty(model.GetSymbolInfo(subpatterns[1])); 1319AssertEmpty(model.GetSymbolInfo(subpatterns[1].ExpressionColon));
Semantics\PrimaryConstructorTests.cs (10)
1089Assert.Equal("Base..ctor(System.Int32 X, System.Int32 Y)", model.GetSymbolInfo((SyntaxNode)baseWithargs).Symbol.ToTestDisplayString()); 1097Assert.Equal("Base..ctor(System.Int32 X, System.Int32 Y)", model.GetSymbolInfo((SyntaxNode)baseWithargs).Symbol.ToTestDisplayString()); 1196Assert.Equal("C..ctor(System.Int32 X, [System.Int32 Y = 123])", model.GetSymbolInfo((SyntaxNode)baseWithargs).Symbol.ToTestDisplayString()); 2122symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs); 2140symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs); 2180Assert.Equal("Base..ctor(System.Int32 X)", speculativeModel.GetSymbolInfo((SyntaxNode)speculativePrimaryInitializer).Symbol.ToTestDisplayString()); 2191Assert.Equal("Base..ctor(System.Int32 X)", speculativeModel.GetSymbolInfo((SyntaxNode)speculativePrimaryInitializer).Symbol.ToTestDisplayString()); 2223symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs); 2304symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs); 2362symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs);
Semantics\RecordTests.cs (11)
8611var symbolInfo = model.GetSymbolInfo(xId); 21206Assert.Equal("Base..ctor(System.Int32 X, System.Int32 Y)", model.GetSymbolInfo((SyntaxNode)baseWithargs).Symbol.ToTestDisplayString()); 21214Assert.Equal("Base..ctor(System.Int32 X, System.Int32 Y)", model.GetSymbolInfo((SyntaxNode)baseWithargs).Symbol.ToTestDisplayString()); 21315Assert.Equal("C..ctor(System.Int32 X, [System.Int32 Y = 123])", model.GetSymbolInfo((SyntaxNode)baseWithargs).Symbol.ToTestDisplayString()); 22279symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs); 22297symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs); 22337Assert.Equal("Base..ctor(System.Int32 X)", speculativeModel!.GetSymbolInfo((SyntaxNode)speculativePrimaryInitializer).Symbol.ToTestDisplayString()); 22348Assert.Equal("Base..ctor(System.Int32 X)", speculativeModel!.GetSymbolInfo((SyntaxNode)speculativePrimaryInitializer).Symbol.ToTestDisplayString()); 22380symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs); 22461symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs); 22519symbolInfo = model.GetSymbolInfo((SyntaxNode)baseWithargs);
Microsoft.CodeAnalysis.CSharp.Features (13)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
300var symbol = semanticModel.GetSymbolInfo(previousToken.Parent, cancellationToken).Symbol;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (7)
1405var symbolInfo = model.GetSymbolInfo(constraintClause.Name, cancellationToken); 1520var oldOrderingInfo = oldModel.GetSymbolInfo(oldNode, cancellationToken); 1521var newOrderingInfo = newModel.GetSymbolInfo(newNode, cancellationToken); 1526var oldSelectInfo = oldModel.GetSymbolInfo(oldNode, cancellationToken); 1527var newSelectInfo = newModel.GetSymbolInfo(newNode, cancellationToken); 1537var oldGroupInfo = oldModel.GetSymbolInfo(oldNode, cancellationToken); 1538var newGroupInfo = newModel.GetSymbolInfo(newNode, cancellationToken);
GenerateType\CSharpGenerateTypeService.cs (1)
59var symbolInfo = semanticModel.GetSymbolInfo(typeArgumentList.Parent, cancellationToken);
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (2)
247var method1 = semanticModel1.GetSymbolInfo(node1, cancellationToken).Symbol as IMethodSymbol; 248var method2 = semanticModel2.GetSymbolInfo(node2, cancellationToken).Symbol as IMethodSymbol;
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (1)
71if (semanticModel.GetSymbolInfo(invocationExpression, cancellationToken).Symbol is not IMethodSymbol methodSymbol)
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
349var previousSymbol = semanticModel.GetSymbolInfo(nodeToReplace, cancellationToken).Symbol;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (42)
Semantics\BindingTests.cs (7)
2932var symbol2 = model.GetSymbolInfo(id).Symbol; 2974var symbol2 = model.GetSymbolInfo(id).Symbol; 3045var symbolInfo1 = model.GetSymbolInfo(node1); 3125var symbolInfo1 = model.GetSymbolInfo(node1); 3198var symbolInfo1 = model.GetSymbolInfo(node1); 3283var symbolInfo1 = model.GetSymbolInfo(node1); 3744var symbolInfo1 = model.GetSymbolInfo(node1);
Semantics\DeconstructionTests.cs (6)
3946var si = model.GetSymbolInfo(node); 6001symbols = model.GetSymbolInfo(argument); 6044symbols = model.GetSymbolInfo(argument); 6084symbols = model.GetSymbolInfo(argument); 6126symbols = model.GetSymbolInfo(argument); 6166symbols = model.GetSymbolInfo(argument);
Semantics\FuzzTests.cs (1)
55var _ = model.GetSymbolInfo(node);
Semantics\LambdaDiscardParametersTests.cs (1)
112Assert.Null(model.GetSymbolInfo(underscore).Symbol);
Semantics\LambdaTests.cs (2)
1985var lambdaParameters = ((IMethodSymbol)(model.GetSymbolInfo(node1)).Symbol).Parameters; 8012.Select(n => (Node: n, Symbol: (IMethodSymbol)model.GetSymbolInfo(n).Symbol))
Semantics\LookupTests.cs (2)
1644imodel.GetSymbolInfo(node, default(CancellationToken)); 1671imodel.GetSymbolInfo(node, default(CancellationToken));
Semantics\MethodTypeInferenceTests.cs (1)
843Assert.Null(model.GetSymbolInfo(discard).Symbol);
Semantics\NativeIntegerTests.cs (2)
10108var symbolInfo = model.GetSymbolInfo(expr); 10333var symbolInfo = model.GetSymbolInfo(expr);
Semantics\NullableReferenceTypesTests.cs (5)
3700var symbol2 = model.GetSymbolInfo(id).Symbol; 35004Assert.Null(model.GetSymbolInfo(variable).Symbol); 71930Assert.Null(model.GetSymbolInfo(discard1.Designation).Symbol); 71967Assert.Null(model.GetSymbolInfo(discardPattern1).Symbol); 71973Assert.Null(model.GetSymbolInfo(discardPattern2).Symbol);
Semantics\OperatorTests.cs (2)
8593var symbols1 = (from node1 in nodes select (IMethodSymbol)semanticModel.GetSymbolInfo(node1).Symbol).ToArray(); 8602var symbols2 = (from node2 in nodes select (IMethodSymbol)semanticModel.GetSymbolInfo(node2).Symbol).ToArray();
Semantics\RefFieldTests.cs (5)
12425Assert.Null(model.GetSymbolInfo(decl).Symbol); 12605Assert.Null(model.GetSymbolInfo(decl).Symbol); 12838Assert.Null(model.GetSymbolInfo(decl).Symbol); 13012Assert.Null(model.GetSymbolInfo(decl).Symbol); 14880Assert.Null(model.GetSymbolInfo(decl).Symbol);
Semantics\SwitchTests.cs (1)
1158var symbolInfo = semanticModel.GetSymbolInfo(node);
Semantics\TopLevelStatementsTests.cs (4)
249var symbolInfo = model1.GetSymbolInfo(tree1.GetRoot()); 259symbolInfo = model1.GetSymbolInfo(globalStatement); 400var symbolInfo = model1.GetSymbolInfo(tree1.GetRoot()); 410symbolInfo = model1.GetSymbolInfo(globalStatement);
SourceGeneration\GeneratorDriverTests.cs (3)
2118static (ctx, ct) => ctx.SemanticModel.GetSymbolInfo(ctx.Node, ct).Symbol?.Name ?? "(method not found)") 2180static (ctx, ct) => ctx.SemanticModel.GetSymbolInfo(ctx.Node, ct).Symbol?.Name ?? "(method not found)") 2277static (ctx, ct) => ctx.SemanticModel.GetSymbolInfo(ctx.Node, ct).Symbol?.Name ?? "(method not found)")
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (25)
Compilation\GetSemanticInfoTests.cs (2)
4912var symbolInfo = model.GetSymbolInfo(equalsNode); 5915Assert.Null(model.GetSymbolInfo(expr).Symbol);
Compilation\SemanticModelAPITests.cs (3)
3614var symbolInfo = semanticModel.GetSymbolInfo(crefSyntax.FindNode(new TextSpan(91, 34))); 3753var exprInfo = model.GetSymbolInfo(expr); 4061var disc = model.GetSymbolInfo(x);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (6)
5309var initializedSymbol = model.GetSymbolInfo(initializers[1]).Symbol; 5404var initializedSymbol = model.GetSymbolInfo(initializers[1]).Symbol; 5452var initializedSymbol = model.GetSymbolInfo(initializers[1]).Symbol; 5495var initializedSymbol = model.GetSymbolInfo(initializers[0]).Symbol; 5590var initializedSymbol = model.GetSymbolInfo(initializers[0]).Symbol; 5638var initializedSymbol = model.GetSymbolInfo(initializers[0]).Symbol;
Symbols\CheckedUserDefinedOperatorsTests.cs (13)
7213Assert.Equal("System.Int64 C0.op_CheckedExplicit(C0 x)", model.GetSymbolInfo(xNode.Parent).Symbol.ToTestDisplayString()); 7214Assert.Equal("System.Int64 C0.op_CheckedExplicit(C0 x)", model.GetSymbolInfo(yNode.Parent).Symbol.ToTestDisplayString()); 7216var int64 = ((IMethodSymbol)model.GetSymbolInfo(xNode.Parent).Symbol).ReturnType; 7285Assert.Equal("System.Int64 C0.op_Explicit(C0 x)", model.GetSymbolInfo(xNode.Parent).Symbol.ToTestDisplayString()); 7286Assert.Equal("System.Int64 C0.op_Explicit(C0 x)", model.GetSymbolInfo(yNode.Parent).Symbol.ToTestDisplayString()); 7288var int64 = ((IMethodSymbol)model.GetSymbolInfo(xNode.Parent).Symbol).ReturnType; 7356Assert.Equal("System.Int64 C0.op_Explicit(C0 x)", model.GetSymbolInfo(xNode.Parent).Symbol.ToTestDisplayString()); 7357Assert.Equal("System.Int64 C0.op_Explicit(C0 x)", model.GetSymbolInfo(yNode.Parent).Symbol.ToTestDisplayString()); 7359var int64 = ((IMethodSymbol)model.GetSymbolInfo(xNode.Parent).Symbol).ReturnType; 7429Assert.Equal("C0 C0.op_CheckedUnaryNegation(C0 a)", model.GetSymbolInfo(xNode.Parent).Symbol.ToTestDisplayString()); 7430Assert.Equal("C0 C0.op_CheckedUnaryNegation(C0 a)", model.GetSymbolInfo(yNode.Parent).Symbol.ToTestDisplayString()); 7493Assert.Equal("C0 C0.op_UnaryNegation(C0 a)", model.GetSymbolInfo(xNode.Parent).Symbol.ToTestDisplayString()); 7494Assert.Equal("C0 C0.op_UnaryNegation(C0 a)", model.GetSymbolInfo(yNode.Parent).Symbol.ToTestDisplayString());
Symbols\Source\LocalTests.cs (1)
63var local = (ILocalSymbol)model.GetSymbolInfo(expressionSyntax).Symbol!;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
273symbolInfo = semanticModel.GetSymbolInfo(pattern);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
CodeGen\WinRTCollectionTests.cs (1)
7425var addMethod = model.GetSymbolInfo(add).Symbol;
Microsoft.CodeAnalysis.CSharp.Workspaces (14)
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.cs (1)
47var symbolInfo = semanticModel.GetSymbolInfo(syntax, cancellationToken);
Rename\CSharpRenameRewriterLanguageService.cs (1)
541var symbol = _speculativeModel.GetSymbolInfo(token.Parent, _cancellationToken).Symbol;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
52var symbolInfo = semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
978var symbol = semanticModel.GetSymbolInfo(current, cancellationToken).Symbol ?? semanticModel.GetDeclaredSymbol(current, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
443if (semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken).Symbol is IMethodSymbol member && index < member.Parameters.Length)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
802var info = semanticModel.GetSymbolInfo(current, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (3)
292/// cref="ModelExtensions.GetSymbolInfo(SemanticModel, SyntaxNode, CancellationToken)"/>, but sometimes employs 352var symbol = semanticModel.GetSymbolInfo(node, cancellationToken).GetAnySymbol(); 365: semanticModel.GetSymbolInfo(node, cancellationToken).GetBestOrAllSymbols();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (4)
1137var oldSymbolInfo = originalSemanticModel.GetSymbolInfo(currentOld, cancellationToken); 1142var newSymbolInfo = rewrittenSemanticModel.GetSymbolInfo(currentNew, cancellationToken); 1198var oldSymbolInfo = originalSemanticModel.GetSymbolInfo(currentOld, cancellationToken).Symbol; 1199var newSymbolInfo = rewrittenSemanticModel.GetSymbolInfo(currentNew, cancellationToken).Symbol;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
285if (semanticModel.GetSymbolInfo(n, cancellationToken).Symbol.IsKind(SymbolKind.Local) == true)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Utilities\SymbolEquivalenceComparerTests.cs (1)
1896var info = model.GetSymbolInfo(invocation);
Microsoft.CodeAnalysis.Features (37)
AddImport\SymbolReferenceFinder.cs (1)
590var symbolInfo = _semanticModel.GetSymbolInfo(nameNode, cancellationToken);
CodeRefactorings\AddAwait\AbstractAddAwaitCodeRefactoringProvider.cs (1)
100var symbol = model.GetSymbolInfo(node, cancellationToken).GetAnySymbol();
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
291return semanticModel.GetSymbolInfo(expression, cancellationToken).Symbol is IMethodSymbol
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
72var info = context.SemanticModel.GetSymbolInfo(typeName);
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (1)
100var symbolInfo = semanticModel.GetSymbolInfo(invocationOrCreation, cancellationToken);
EmbeddedLanguages\EmbeddedLanguageDetector.cs (1)
430var symbol = semanticModel.GetSymbolInfo(left, cancellationToken).Symbol;
ExtractMethod\Extensions.cs (1)
15var info = binding.GetSymbolInfo(node);
FullyQualify\AbstractFullyQualifyService.cs (1)
143var currentSymbolInfo = semanticModel.GetSymbolInfo(simpleName, cancellationToken);
GenerateType\AbstractGenerateTypeService.State.cs (2)
121var info = semanticModel.GetSymbolInfo(SimpleName, cancellationToken); 379var leftSideInfo = semanticModel.GetSymbolInfo(leftSide, cancellationToken);
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (1)
592return semanticModel.GetSymbolInfo(node, cancellationToken).Symbol;
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (1)
444localVariable.Equals(semanticModel.GetSymbolInfo(node, cancellationToken).Symbol));
PreferFrameworkType\PreferFrameworkTypeDiagnosticAnalyzerBase.cs (1)
88if (semanticModel.GetSymbolInfo(typeNode, cancellationToken).Symbol is not ITypeSymbol typeSymbol ||
QuickInfo\CommonSemanticQuickInfoProvider.cs (2)
241var symbol = semanticModel.GetSymbolInfo(lambdaSyntax, cancellationToken).Symbol; 247var symbol = semanticModel.GetSymbolInfo(elementAccessExpression, cancellationToken).Symbol;
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (2)
113var symbolInfo = semanticModel.GetSymbolInfo(expression, cancellationToken); 146var symbolInfo = semanticModel.GetSymbolInfo(expression, cancellationToken);
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
80var symbolInfo = semanticModel.GetSymbolInfo(name, cancellationToken);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
454var symbolInfo = nameofArgument.SemanticModel!.GetSymbolInfo(nameofArgument.Syntax, operationContext.CancellationToken);
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
243if (semanticModel.GetSymbolInfo(identifierName, cancellationToken).Symbol is not IFieldSymbol field)
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
176var symbol = semanticModel.GetSymbolInfo(identifier, cancellationToken).GetAnySymbol();
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
176var initializedSymbol = semanticModel.GetSymbolInfo(left, cancellationToken).GetAnySymbol();
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (1)
121SemanticModel.GetSymbolInfo(subExpression, cancellationToken).GetAnySymbol()))
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (1)
102var symbolInfo = semanticModel.GetSymbolInfo(expr, cancellationToken);
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
101var symbol = semanticModel.GetSymbolInfo(invocation, cancellationToken).Symbol;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (2)
177var memberSymbol = semanticModel.GetSymbolInfo(whenPartToCheck, cancellationToken).GetAnySymbol(); 320var symbol = semanticModel.GetSymbolInfo(invocation, cancellationToken).Symbol;
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
79var memberSymbol = semanticModel.GetSymbolInfo(memberAccess, cancellationToken).GetAnySymbol();
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
115var leftSymbol = this.SemanticModel.GetSymbolInfo(leftMemberAccess, cancellationToken).GetAnySymbol();
src\Analyzers\Core\CodeFixes\AddExplicitCast\Fixer.cs (1)
49var symbolInfo = semanticModel.GetSymbolInfo(invocationNode, cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
106var semanticInfo = semanticModel.GetSymbolInfo(SimpleNameOrMemberAccessExpression, cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (1)
187var semanticInfo = semanticModel.GetSymbolInfo(expression, cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
194var semanticInfo = semanticModel.GetSymbolInfo(SimpleNameOrMemberAccessExpression, cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
272var semanticInfo = semanticModel.GetSymbolInfo(SimpleNameOrMemberAccessExpressionOpt, cancellationToken);
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
90var symbol = semanticModel.GetDeclaredSymbol(node, cancellationToken) ?? semanticModel.GetSymbolInfo(node, cancellationToken).GetAnySymbol();
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
105=> semanticModel.GetSymbolInfo(node, cancellationToken).Symbol as IMethodSymbol ??
ValueTracking\ValueTracker.OperationCollector.cs (1)
79var symbolInfo = semanticModel.GetSymbolInfo(operation.Syntax, cancellationToken);
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\TestOperationVisitor.cs (1)
799var symbolInfo = semanticModel?.GetSymbolInfo(syntax) ?? default;
Microsoft.CodeAnalysis.UnitTests (1)
Symbols\DocumentationCommentIdTests.cs (1)
181var symbol = semanticModel.GetSymbolInfo(node!).Symbol;
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (6)
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedMembers\VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb (1)
48Dim symbolInfo = context.SemanticModel.GetSymbolInfo(node, context.CancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (1)
36Dim symbolInfo = semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
296Dim info = semanticModel.GetSymbolInfo(parent, cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
243Dim member = TryCast(semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken).Symbol, IMethodSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (1)
1085Dim info = semanticModel.GetSymbolInfo(current, cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
268semanticModel.GetSymbolInfo(node, cancellationToken).GetBestOrAllSymbols())
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (1)
174Dim symbolInfo = semanticModel.GetSymbolInfo(invocationNode, cancellationToken)
src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (1)
58Dim methodSymbol = TryCast(semanticModel.GetSymbolInfo(oldNode, cancellationToken).Symbol, IMethodSymbol)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
93Dim symbolInfo = semanticModel.GetSymbolInfo(node, cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Features (6)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
138Dim symbolInfo = semanticModel.GetSymbolInfo(matchingNode, cancellationToken)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (1)
322Dim symbol = semanticModel.GetSymbolInfo(handlesClauseItem, cancellationToken).Symbol
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedMembers\VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb (1)
48Dim symbolInfo = context.SemanticModel.GetSymbolInfo(node, context.CancellationToken)
src\Analyzers\VisualBasic\CodeFixes\AddExplicitCast\VisualBasicAddExplicitCastCodeFixProvider.vb (1)
174Dim symbolInfo = semanticModel.GetSymbolInfo(invocationNode, cancellationToken)
src\Analyzers\VisualBasic\CodeFixes\ConvertToAsync\VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (1)
58Dim methodSymbol = TryCast(semanticModel.GetSymbolInfo(oldNode, cancellationToken).Symbol, IMethodSymbol)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
93Dim symbolInfo = semanticModel.GetSymbolInfo(node, cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (9)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (1)
181Return model.GetSymbolInfo(node, cancellationToken).GetAnySymbol()
Classification\SyntaxClassification\OperatorOverloadSyntaxClassifier.vb (1)
40Dim symbolInfo = semanticModel.GetSymbolInfo(syntax, cancellationToken)
Rename\LocalConflictVisitor.vb (1)
150Dim symbol = _semanticModel.GetSymbolInfo(controlVariable, _cancellationToken).Symbol
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
402Dim symbol = Me._speculativeModel.GetSymbolInfo(token.Parent, Me._cancellationToken).Symbol
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ArgumentSyntaxExtensions.vb (1)
36Dim symbolInfo = semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ExpressionSyntaxExtensions.vb (1)
296Dim info = semanticModel.GetSymbolInfo(parent, cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
243Dim member = TryCast(semanticModel.GetSymbolInfo(argumentList.Parent, cancellationToken).Symbol, IMethodSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (1)
1085Dim info = semanticModel.GetSymbolInfo(current, cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (1)
268semanticModel.GetSymbolInfo(node, cancellationToken).GetBestOrAllSymbols())
Microsoft.CodeAnalysis.Workspaces (32)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (1)
197var attributeSymbol = semanticModel.GetSymbolInfo(attributeNode, cancellationToken).Symbol?.ContainingType;
FindSymbols\FindReferences\FindReferenceCache.cs (1)
93=> _symbolInfoCache.GetOrAdd(node, static (n, arg) => arg.SemanticModel.GetSymbolInfo(n, arg.cancellationToken), (SemanticModel, cancellationToken));
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (2)
135var symbol = semanticModel.GetSymbolInfo(node, cancellationToken).Symbol; 150var symbol = semanticModel.GetSymbolInfo(node, cancellationToken).Symbol;
ReassignedVariable\AbstractReassignedVariableService.cs (2)
129var symbol = semanticModel.GetSymbolInfo(identifier, cancellationToken).Symbol; 326var symbol = semanticModel.GetSymbolInfo(id, cancellationToken).Symbol;
Recommendations\AbstractRecommendationServiceRunner.cs (1)
141var invocationSymbols = _context.SemanticModel.GetSymbolInfo(invocationExpression).GetAllSymbols();
Rename\ConflictEngine\ConflictResolver.cs (1)
132var symbolInfo = semanticModel.GetSymbolInfo(invocationExpression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
62var info1 = semanticModel1.GetSymbolInfo(node1); 63var info2 = semanticModel2.GetSymbolInfo(node2);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (2)
33=> semanticModel.GetSymbolInfo(token.Parent!, cancellationToken); 243var symbolInfo = semanticModel.GetSymbolInfo(expression, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFactsExtensions.cs (1)
29var symbolInfo = semanticModel.GetSymbolInfo(innerBinary);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs (1)
57var symbol = semanticModel.GetSymbolInfo(node, reader.CancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
733var info = semanticModel.GetSymbolInfo(node, CancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AbstractSpeculationAnalyzer.cs (13)
323var originalSymbolInfo = this.OriginalSemanticModel.GetSymbolInfo(originalNode); 324var newSymbolInfo = this.SpeculativeSemanticModel.GetSymbolInfo(newNode); 678var originalIsStaticAccess = IsStaticAccess(OriginalSemanticModel.GetSymbolInfo(originalExpression, CancellationToken).Symbol); 679var replacedIsStaticAccess = IsStaticAccess(this.SpeculativeSemanticModel.GetSymbolInfo(newExpression, CancellationToken).Symbol); 735var originalExpressionSymbol = this.OriginalSemanticModel.GetSymbolInfo(currentOriginalNode).Symbol; 736var replacedExpressionSymbol = this.SpeculativeSemanticModel.GetSymbolInfo(currentReplacedNode).Symbol; 766var attributeSym = this.OriginalSemanticModel.GetSymbolInfo(attribute).Symbol; 767var newAttributeSym = this.SpeculativeSemanticModel.GetSymbolInfo(newAttribute).Symbol; 860var symbol = this.OriginalSemanticModel.GetSymbolInfo(type).Symbol; 865newSymbol = this.SpeculativeSemanticModel.GetSymbolInfo(newType, CancellationToken).Symbol; 891var originalSymbolInfo = OriginalSemanticModel.GetSymbolInfo(expression); 897var newSymbolInfo = this.SpeculativeSemanticModel.GetSymbolInfo(node: newExpression); 1054var receiverSymbol = semanticModel.GetSymbolInfo(receiver).GetAnySymbol();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (2)
87var symbolInfo = semanticModel.GetSymbolInfo(expression); 102var expressionInfo = semanticModel.GetSymbolInfo(expression);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\Simplifiers\AbstractMemberAccessExpressionSimplifier.cs (2)
54var symbolInfo = semanticModel.GetSymbolInfo(memberAccessExpression, cancellationToken); 66var newSymbolInfo = speculationAnalyzer.SpeculativeSemanticModel.GetSymbolInfo(speculationAnalyzer.ReplacedExpression, cancellationToken);
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SymbolKeyTests.cs (3)
620var symbols = tree.GetRoot().DescendantNodes().OfType<CSharp.Syntax.InvocationExpressionSyntax>().Select(s => model.GetSymbolInfo(s).Symbol).ToList(); 656var symbols = tree.GetRoot().DescendantNodes().OfType<CSharp.Syntax.InvocationExpressionSyntax>().Select(s => model.GetSymbolInfo(s).GetAnySymbol()).ToList(); 1513symbol = model.GetSymbolInfo(node).GetAnySymbol();
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\CustomMarshallerAttributeFixer.cs (2)
45var marshallerType = (INamedTypeSymbol)model.GetSymbolInfo(node, fixAllContext.CancellationToken).Symbol; 171INamedTypeSymbol marshallerType = (INamedTypeSymbol)model.GetSymbolInfo(node, ct).Symbol;
Microsoft.Maui.Controls.BindingSourceGen (2)
InvocationParser.cs (2)
35 var symbol = _context.SemanticModel.GetSymbolInfo(invocation.Expression).Symbol; 66 var symbol = _context.SemanticModel.GetSymbolInfo(invocation.Expression).Symbol;
Microsoft.ML.InternalCodeAnalyzer (1)
BestFriendAnalyzer.cs (1)
77var symbol = model.GetSymbolInfo(node).Symbol;
Microsoft.VisualStudio.LanguageServices (1)
Progression\GraphQueries\CallsGraphQuery.cs (1)
53var newSymbol = semanticModel.GetSymbolInfo(syntaxNode, cancellationToken).Symbol;