2 instantiations of SymbolInfo
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
1298 references to SymbolInfo
Microsoft.AspNetCore.App.Analyzers (5)
Microsoft.AspNetCore.App.CodeFixes (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.CodeAnalysis (10)
Microsoft.CodeAnalysis.CodeStyle (26)
Microsoft.CodeAnalysis.CodeStyle.Fixes (16)
Microsoft.CodeAnalysis.CSharp (124)
Compilation\CSharpSemanticModel.cs (62)
139internal abstract SymbolInfo GetSymbolInfoWorker(CSharpSyntaxNode node, SymbolInfoOptions options, CancellationToken cancellationToken = default(CancellationToken));
146internal abstract SymbolInfo GetCollectionInitializerSymbolInfoWorker(InitializerExpressionSyntax collectionInitializer, ExpressionSyntax node, CancellationToken cancellationToken = default(CancellationToken));
331internal SymbolInfo GetCrefSymbolInfo(int position, CrefSyntax crefSyntax, SymbolInfoOptions options, bool hasParameterList)
340return SymbolInfo.None;
365private static SymbolInfo GetCrefSymbolInfo(OneOrMany<Symbol> symbols, SymbolInfoOptions options, bool hasParameterList)
370return SymbolInfo.None;
492public abstract SymbolInfo GetSymbolInfo(OrderingSyntax node, CancellationToken cancellationToken = default(CancellationToken));
497public abstract SymbolInfo GetSymbolInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken));
502public SymbolInfo GetSymbolInfo(PositionalPatternClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken))
519public SymbolInfo GetSymbolInfo(ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken))
525return SymbolInfo.None;
561return SymbolInfo.None;
567return SymbolInfo.None;
575private static SymbolInfo GetSymbolInfoFromSymbolOrNone(ITypeSymbol type)
582return SymbolInfo.None;
608public SymbolInfo GetCollectionInitializerSymbolInfo(ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken))
636return SymbolInfo.None;
644public SymbolInfo GetSymbolInfo(ConstructorInitializerSyntax constructorInitializer, CancellationToken cancellationToken = default(CancellationToken))
650: SymbolInfo.None;
658public SymbolInfo GetSymbolInfo(PrimaryConstructorBaseTypeSyntax constructorInitializer, CancellationToken cancellationToken = default(CancellationToken))
664: SymbolInfo.None;
672public SymbolInfo GetSymbolInfo(AttributeSyntax attributeSyntax, CancellationToken cancellationToken = default(CancellationToken))
678: SymbolInfo.None;
684public SymbolInfo GetSymbolInfo(CrefSyntax crefSyntax, CancellationToken cancellationToken = default(CancellationToken))
690: SymbolInfo.None;
716public SymbolInfo GetSpeculativeSymbolInfo(int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption)
718if (!CanGetSemanticInfo(expression, isSpeculative: true)) return SymbolInfo.None;
726return crefSymbols.IsDefault ? SymbolInfo.None : GetCrefSymbolInfo(OneOrMany.Create(crefSymbols), SymbolInfoOptions.DefaultOptions, hasParameterList: false);
729var symbolInfo = this.GetSymbolInfoForNode(SymbolInfoOptions.DefaultOptions, boundNode, boundNode, boundNodeForSyntacticParent: null, binderOpt: binder);
747public SymbolInfo GetSpeculativeSymbolInfo(int position, AttributeSyntax attribute)
754return SymbolInfo.None;
756var symbolInfo = this.GetSymbolInfoForNode(SymbolInfoOptions.DefaultOptions, boundNode, boundNode, boundNodeForSyntacticParent: null, binderOpt: binder);
775public SymbolInfo GetSpeculativeSymbolInfo(int position, ConstructorInitializerSyntax constructorInitializer)
797return SymbolInfo.None;
804return SymbolInfo.None;
813var binfo = GetSymbolInfoFromBoundConstructorInitializer(memberModel, binder, bnode);
818return SymbolInfo.None;
822private static SymbolInfo GetSymbolInfoFromBoundConstructorInitializer(MemberSemanticModel memberModel, Binder binder, BoundExpressionStatement bnode)
847public SymbolInfo GetSpeculativeSymbolInfo(int position, PrimaryConstructorBaseTypeSyntax constructorInitializer)
869return SymbolInfo.None;
876return SymbolInfo.None;
886SymbolInfo binfo = GetSymbolInfoFromBoundConstructorInitializer(memberModel, binder, bnode);
891return SymbolInfo.None;
908public SymbolInfo GetSpeculativeSymbolInfo(int position, CrefSyntax cref, SymbolInfoOptions options = SymbolInfoOptions.DefaultOptions)
1175SymbolInfo info = GetSymbolInfoWorker(nameSyntax, SymbolInfoOptions.PreferTypeToConstructors | SymbolInfoOptions.PreserveAliases, cancellationToken);
1208var symbolInfo = this.GetSymbolInfoForNode(SymbolInfoOptions.PreferTypeToConstructors | SymbolInfoOptions.PreserveAliases,
1866internal SymbolInfo GetSymbolInfoForNode(
1892return SymbolInfo.None;
1977private static SymbolInfo GetSymbolInfoForSubpattern(Symbol subpatternSymbol)
1987private SymbolInfo GetSymbolInfoForDeconstruction(BoundRecursivePattern pat)
2310internal static SymbolInfo GetSymbolInfoForSymbol(Symbol symbol, SymbolInfoOptions options)
4473private SymbolInfo GetNamedArgumentSymbolInfo(IdentifierNameSyntax identifierNameSyntax, CancellationToken cancellationToken)
4489return SymbolInfo.None; // missing name.
4498return (object)tupleElement == null ? SymbolInfo.None : new SymbolInfo(tupleElement);
4507SymbolInfo containingInvocationInfo = GetSymbolInfoWorker(containingInvocation, SymbolInfoOptions.PreferConstructorsToType | SymbolInfoOptions.ResolveAliases, cancellationToken);
4512return (object)param == null ? SymbolInfo.None : new SymbolInfo(param.GetPublicSymbol());
4538return SymbolInfo.None;
4950private SymbolInfo GetSymbolInfoFromNode(SyntaxNode node, CancellationToken cancellationToken)
4974return SymbolInfo.None;
5021protected sealed override SymbolInfo GetSpeculativeSymbolInfoCore(int position, SyntaxNode node, SpeculativeBindingOption bindingOption)
5037return SymbolInfo.None;
5054protected sealed override SymbolInfo GetSymbolInfoCore(SyntaxNode node, CancellationToken cancellationToken)
Compilation\MemberSemanticModel.cs (10)
872SymbolInfo symbolInfo = this.GetSymbolInfo(lambda, cancellationToken);
1042var castInfo = (bound.Cast == null) ? SymbolInfo.None : GetSymbolInfoForNode(SymbolInfoOptions.DefaultOptions, bound.Cast, bound.Cast, boundNodeForSyntacticParent: null, binderOpt: null);
1043var operationInfo = GetSymbolInfoForQuery(bound);
1047private SymbolInfo GetSymbolInfoForQuery(BoundQueryClause bound)
1052return SymbolInfo.None;
1207internal override SymbolInfo GetSymbolInfoWorker(CSharpSyntaxNode node, SymbolInfoOptions options, CancellationToken cancellationToken = default(CancellationToken))
1269internal override SymbolInfo GetCollectionInitializerSymbolInfoWorker(InitializerExpressionSyntax collectionInitializer, ExpressionSyntax node, CancellationToken cancellationToken = default(CancellationToken))
1280return SymbolInfo.None;
1283public override SymbolInfo GetSymbolInfo(OrderingSyntax node, CancellationToken cancellationToken = default(CancellationToken))
1289public override SymbolInfo GetSymbolInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (12)
202internal override SymbolInfo GetSymbolInfoWorker(CSharpSyntaxNode node, SymbolInfoOptions options, CancellationToken cancellationToken = default(CancellationToken))
210SymbolInfo result;
235SymbolInfo info = GetSymbolInfoForNode(options, bound, bound, boundNodeForSyntacticParent: null, binderOpt: null);
249result = SymbolInfo.None;
264result = SymbolInfo.None;
285result = (object)symbol != null ? GetSymbolInfoForSymbol(symbol, options) : SymbolInfo.None;
291internal override SymbolInfo GetCollectionInitializerSymbolInfoWorker(InitializerExpressionSyntax collectionInitializer, ExpressionSyntax node, CancellationToken cancellationToken = default(CancellationToken))
302return SymbolInfo.None;
431public override SymbolInfo GetSymbolInfo(SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken))
435return (model == null) ? SymbolInfo.None : model.GetSymbolInfo(node, cancellationToken);
494public override SymbolInfo GetSymbolInfo(OrderingSyntax node, CancellationToken cancellationToken = default(CancellationToken))
498return (model == null) ? SymbolInfo.None : model.GetSymbolInfo(node, cancellationToken);
CSharpExtensions.cs (26)
456public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, OrderingSyntax node, CancellationToken cancellationToken = default(CancellationToken))
465return SymbolInfo.None;
472public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, SelectOrGroupClauseSyntax node, CancellationToken cancellationToken = default(CancellationToken))
481return SymbolInfo.None;
496public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken))
505return SymbolInfo.None;
513public static SymbolInfo GetCollectionInitializerSymbolInfo(this SemanticModel? semanticModel, ExpressionSyntax expression, CancellationToken cancellationToken = default(CancellationToken))
522return SymbolInfo.None;
529public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, ConstructorInitializerSyntax constructorInitializer, CancellationToken cancellationToken = default(CancellationToken))
538return SymbolInfo.None;
545public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, PrimaryConstructorBaseTypeSyntax constructorInitializer, CancellationToken cancellationToken = default(CancellationToken))
554return SymbolInfo.None;
561public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, AttributeSyntax attributeSyntax, CancellationToken cancellationToken = default(CancellationToken))
570return SymbolInfo.None;
577public static SymbolInfo GetSymbolInfo(this SemanticModel? semanticModel, CrefSyntax crefSyntax, CancellationToken cancellationToken = default(CancellationToken))
586return SymbolInfo.None;
595public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, ExpressionSyntax expression, SpeculativeBindingOption bindingOption)
604return SymbolInfo.None;
613public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, CrefSyntax expression, SpeculativeBindingOption bindingOption)
622return SymbolInfo.None;
631public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, AttributeSyntax attribute)
640return SymbolInfo.None;
651public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, ConstructorInitializerSyntax constructorInitializer)
660return SymbolInfo.None;
672public static SymbolInfo GetSpeculativeSymbolInfo(this SemanticModel? semanticModel, int position, PrimaryConstructorBaseTypeSyntax constructorInitializer)
681return SymbolInfo.None;
Microsoft.CodeAnalysis.CSharp.CodeStyle (18)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (9)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (20)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (130)
Semantics\PrimaryConstructorTests.cs (31)
1369var symbolInfo = model.GetSymbolInfo(x);
1415var symbolInfo = model.GetSymbolInfo(x);
1475var symbolInfo = model.GetSymbolInfo(x);
1544var symbolInfo = model.GetSymbolInfo(x);
1633var symbolInfo = model.GetSymbolInfo(x);
1818var symbolInfo = model.GetSymbolInfo(x);
1858var symbolInfo = model.GetSymbolInfo(x);
1901var symbolInfo = model.GetSymbolInfo(x);
2114SymbolInfo symbolInfo;
2169Assert.Equal(SymbolInfo.None, symbolInfo);
2172Assert.Equal(SymbolInfo.None, symbolInfo);
2200Assert.Equal(SymbolInfo.None, symbolInfo);
2203Assert.Equal(SymbolInfo.None, symbolInfo);
2245Assert.Equal(SymbolInfo.None, symbolInfo);
2296SymbolInfo symbolInfo;
2306Assert.Equal(SymbolInfo.None, symbolInfo);
2308Assert.Equal(SymbolInfo.None, symbolInfo);
2310Assert.Equal(SymbolInfo.None, symbolInfo);
2321Assert.Equal(SymbolInfo.None, symbolInfo);
2324Assert.Equal(SymbolInfo.None, symbolInfo);
2339Assert.Equal(SymbolInfo.None, symbolInfo);
2342Assert.Equal(SymbolInfo.None, symbolInfo);
2345Assert.Equal(SymbolInfo.None, symbolInfo);
2348Assert.Equal(SymbolInfo.None, symbolInfo);
2351Assert.Equal(SymbolInfo.None, symbolInfo);
2354Assert.Equal(SymbolInfo.None, symbolInfo);
2384Assert.Equal(SymbolInfo.None, symbolInfo);
2429var symbolInfo = model.GetSymbolInfo(x);
6096var symbolInfo = model.GetSymbolInfo(x);
7797var symbolInfo = model.GetSymbolInfo(p1);
19789var info = model.GetSymbolInfo(indexer);
Semantics\RecordTests.cs (30)
8611var symbolInfo = model.GetSymbolInfo(xId);
21487var symbolInfo = model.GetSymbolInfo(x);
21533var symbolInfo = model.GetSymbolInfo(x);
21593var symbolInfo = model.GetSymbolInfo(x);
21662var symbolInfo = model.GetSymbolInfo(x);
21751var symbolInfo = model.GetSymbolInfo(x);
21936var symbolInfo = model.GetSymbolInfo(x);
21973var symbolInfo = model.GetSymbolInfo(x);
22013var symbolInfo = model.GetSymbolInfo(x);
22048var symbolInfo = model.GetSymbolInfo(x);
22270SymbolInfo symbolInfo;
22325Assert.Equal(SymbolInfo.None, symbolInfo);
22328Assert.Equal(SymbolInfo.None, symbolInfo);
22356Assert.Equal(SymbolInfo.None, symbolInfo);
22359Assert.Equal(SymbolInfo.None, symbolInfo);
22401Assert.Equal(SymbolInfo.None, symbolInfo);
22452SymbolInfo symbolInfo;
22462Assert.Equal(SymbolInfo.None, symbolInfo);
22464Assert.Equal(SymbolInfo.None, symbolInfo);
22466Assert.Equal(SymbolInfo.None, symbolInfo);
22477Assert.Equal(SymbolInfo.None, symbolInfo);
22480Assert.Equal(SymbolInfo.None, symbolInfo);
22495Assert.Equal(SymbolInfo.None, symbolInfo);
22498Assert.Equal(SymbolInfo.None, symbolInfo);
22501Assert.Equal(SymbolInfo.None, symbolInfo);
22504Assert.Equal(SymbolInfo.None, symbolInfo);
22507Assert.Equal(SymbolInfo.None, symbolInfo);
22510Assert.Equal(SymbolInfo.None, symbolInfo);
22540Assert.Equal(SymbolInfo.None, symbolInfo);
28236var symbolInfo = model.GetSymbolInfo(x);
Microsoft.CodeAnalysis.CSharp.Features (40)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (282)
Semantics\NameOfTests.cs (13)
686var symbolInfo = model.GetSymbolInfo(node, default(CancellationToken));
712var symbolInfo = model.GetSymbolInfo(node, default(CancellationToken));
747var symbolInfo = model.GetSymbolInfo(node, default(CancellationToken));
794var symbolInfo = model.GetSymbolInfo(node, default(CancellationToken));
831var symbolInfo = model.GetSymbolInfo(node, default(CancellationToken));
867var symbolInfo = model.GetSymbolInfo(node, default(CancellationToken));
913var symbolInfo = model.GetSymbolInfo(node, default(CancellationToken));
946var symbolInfo = model.GetSymbolInfo(node, default(CancellationToken));
1008void verifySymbolInfo(SymbolInfo symbolInfo)
1079void verifySymbolInfo(CandidateReason reason, SymbolInfo symbolInfo)
1165void verifySymbolInfo(SymbolInfo symbolInfo)
1243void verifySymbolInfo(CandidateReason reason, SymbolInfo symbolInfo)
1423var symbolInfo = model.GetSymbolInfo(node, default(CancellationToken));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (248)
Compilation\GetSemanticInfoTests.cs (68)
43var sym = model.GetSymbolInfo(expr);
74var sym = model.GetSymbolInfo(expr);
103var sym = model.GetSymbolInfo(expr);
137var sym = model.GetSymbolInfo(expr);
166var sym = model.GetSymbolInfo(expr);
1069var bindInfo = BindFirstConstructorInitializer(text);
1088var bindInfo = BindFirstConstructorInitializer(text);
1113var bindInfo = BindFirstConstructorInitializer(text);
1846var bindInfo = model.GetSymbolInfo(exprSyntaxToBind);
1888var bindInfo = model.GetSymbolInfo(nameSyntaxToBind);
1916var bindInfo = model.GetSymbolInfo(exprSyntaxToBind);
1952var bindInfo = model.GetSymbolInfo(exprSyntaxToBind);
1988var bindInfo = model.GetSymbolInfo(exprSyntaxToBind);
2024var bindInfo = model.GetSymbolInfo(exprSyntaxToBind);
2059var bindInfo = model.GetSymbolInfo(exprSyntaxToBind);
2327var typeInfo = model.GetSymbolInfo(expr);
2396var symbolInfo = model.GetSymbolInfo(expr);
2452var sym = model.GetSymbolInfo(expr);
2481var sym = model.GetSymbolInfo(expr);
2538var info = model.GetSymbolInfo(expr);
2725var symbolInfo = model.GetSymbolInfo(expr);
2796var symbolInfo = model.GetSymbolInfo(expr);
2842var symbolInfo = model.GetSymbolInfo(expr);
2873var symbolInfo = model.GetSymbolInfo(expr);
2933var symbolInfo = model.GetSymbolInfo(expr);
2966var symbolInfo = model.GetSymbolInfo(expr);
3025var symbolInfo = model.GetSymbolInfo(expr);
3058var symbolInfo = model.GetSymbolInfo(expr);
3099var symbolInfo = model.GetSymbolInfo(expr);
3132var symbolInfo = model.GetSymbolInfo(expr);
3173var symbolInfo = model.GetSymbolInfo(expr);
3206var symbolInfo = model.GetSymbolInfo(expr);
3249var symbolInfo = model.GetSymbolInfo(expr);
3469var symbolInfo = model.GetSymbolInfo(expr);
3523var symbolInfo = model.GetSymbolInfo(expr);
3583var symbolInfo = model.GetSymbolInfo(expr);
3759var symbolInfo = model.GetSymbolInfo(expr);
3789var info = model.GetSpeculativeSymbolInfo(position, syntax, SpeculativeBindingOption.BindAsExpression);
3822var info = model.GetSpeculativeSymbolInfo(position, syntax, SpeculativeBindingOption.BindAsExpression);
3849var info = model.GetSymbolInfo(syntax);
3875var info = model.GetSymbolInfo(syntax);
3916var info = model.GetSpeculativeSymbolInfo(position, syntax, SpeculativeBindingOption.BindAsExpression);
3956var info = model.GetSpeculativeSymbolInfo(position, syntax, SpeculativeBindingOption.BindAsExpression);
4001var info = model.GetSymbolInfo(syntax);
4041var info1 = model.GetSymbolInfo(originalSyntax);
4069var info2 = model.GetSpeculativeSymbolInfo(originalSyntax.SpanStart, speculativeSyntax, SpeculativeBindingOption.BindAsExpression);
4115var info0 = model.GetSymbolInfo(localDecl2.Type);
4119var info1 = model.GetSymbolInfo(localDecl1.Type);
4123var info2 = model.GetSymbolInfo(localDecl2.Type);
4170var info1 = model.GetSymbolInfo(localDecl1.Type);
4174var info2 = model.GetSymbolInfo(localDecl2.Type);
4214var info = model.GetSpeculativeSymbolInfo(syntax.SpanStart, syntax, SpeculativeBindingOption.BindAsTypeOrNamespace);
4325var symbolInfo = model.GetSpeculativeSymbolInfo(0, initializerSyntax, SpeculativeBindingOption.BindAsExpression);
4326Assert.Equal(SymbolInfo.None, symbolInfo);
4356var info = model.GetSymbolInfo(syntax);
4442var leftInfo = model.GetSymbolInfo(leftSyntax);
4446var rightInfo = model.GetSymbolInfo(rightSyntax);
4492var info = model.GetSymbolInfo(memberAccessSyntax);
4539var typeInfo = model.GetSymbolInfo(nestedTypeAccessSyntax);
4543var methodInfo = model.GetSymbolInfo(callSyntax);
4595var classInfo = model.GetSymbolInfo(classMemberAccess);
4596var structInfo = model.GetSymbolInfo(structMemberAccess);
4643var info = model.GetSymbolInfo(memberAccess);
4787var symbolInfo = model.GetSymbolInfo(lambdaSyntax);
4830var symbolInfo = model.GetSymbolInfo(syntax);
4912var symbolInfo = model.GetSymbolInfo(equalsNode);
5479var invocationInfo = model.GetSymbolInfo(invocationSyntax);
6014var info = model.GetSpeculativeSymbolInfo(position, syntax, SpeculativeBindingOption.BindAsExpression);
Compilation\SemanticModelAPITests.cs (58)
101var info = checkSymbolInfo(comp2);
105static SymbolInfo checkSymbolInfo(CSharpCompilation comp)
143var symbolInfo = model.GetSymbolInfo(indexerAccess);
178var assignmentInfo = model.GetSymbolInfo(assignment);
204var rxInfo = model.GetSymbolInfo(rx);
236var rxInfo = model.GetSymbolInfo(rx);
537var info = model.GetSymbolInfo(bbase);
563var info = model.GetSymbolInfo(cbase);
589var info = model.GetSymbolInfo(cbase);
612var info = model.GetSymbolInfo(bbase);
650var lookup = model.GetSymbolInfo(program);
678var info = model.GetSymbolInfo(type);
707var info = model.GetSymbolInfo(type);
730var symbolInfo = model.GetSpeculativeSymbolInfo(xdecl.SpanStart, speculate, SpeculativeBindingOption.BindAsTypeOrNamespace);
798var info = model.GetSymbolInfo((xDecl.Declaration.Type as QualifiedNameSyntax).Right);
1339Assert.Equal(SymbolInfo.None, model.GetSymbolInfo(aliasSyntax));
1365var info = model.GetSpeculativeSymbolInfo(oldSyntax.SpanStart, newSyntax);
1394var info = model.GetSpeculativeSymbolInfo(oldSyntax.ParameterList.Span.End, newSyntax);
1395Assert.Equal(SymbolInfo.None, info);
1735var aliasDeclInfo = model.GetSymbolInfo(aliasDecl.Alias.Name);
1746var fieldTypeInfo = model.GetSymbolInfo(typeSyntax);
1799var info = speculativeModel.GetSymbolInfo(arg);
1806var info2 = speculativeModel.GetSymbolInfo(arg2);
2047var symbolInfo = speculativeModel.GetSpeculativeSymbolInfo(
2081var info = speculativeModel.GetSymbolInfo(newSyntax);
2405var info = speculativeModel.GetSymbolInfo(arg);
2413var info2 = speculativeModel.GetSymbolInfo(arg2);
3101var symbolInfo = model.GetSpeculativeSymbolInfo(methodDecl.Body.SpanStart, speculatedCref);
3231var info = speculativeModel.GetSymbolInfo(omittedArraySize); // Used to throw NRE.
3260var info1 = model.GetSymbolInfo(method1);
3272var info2 = speculativeModel.GetSymbolInfo(method2);
3301var info1 = model.GetSymbolInfo(method1);
3313var info2 = speculativeModel.GetSymbolInfo(method2);
3342var info1 = model.GetSymbolInfo(method1);
3347var info2 = model.GetSpeculativeSymbolInfo(position, statementSyntax, SpeculativeBindingOption.BindAsExpression);
3376var info1 = model.GetSymbolInfo(method1);
3389var info2 = speculativeModel.GetSymbolInfo(method2);
3418var info1 = model.GetSymbolInfo(method1);
3430var info2 = speculativeModel.GetSymbolInfo(method2);
3459var info1 = model.GetSymbolInfo(method1);
3471var info2 = speculativeModel.GetSymbolInfo(method2);
3500var info1 = model.GetSymbolInfo(method1);
3505var info2 = model.GetSpeculativeSymbolInfo(position, statementSyntax, SpeculativeBindingOption.BindAsExpression);
3527var symbolInfo = model.GetSpeculativeSymbolInfo(position, attr2);
3550var symbolInfo = model2.GetSymbolInfo(attr2);
3592var info = speculativeModel.GetSymbolInfo(attributeSyntax.Name);
3614var symbolInfo = semanticModel.GetSymbolInfo(crefSyntax.FindNode(new TextSpan(91, 34)));
3621var speculativeSymbolInfo = semanticModel.GetSpeculativeSymbolInfo(crefSyntax.SpanStart, speculatedName, SpeculativeBindingOption.BindAsExpression);
3753var exprInfo = model.GetSymbolInfo(expr);
4061var disc = model.GetSymbolInfo(x);
4485var varSymbolInfo = model.GetSymbolInfo(varNode);
4488var declarationExpressionSymbolInfo = model.GetSymbolInfo(declarationExpression);
4489Assert.Equal(SymbolInfo.None, declarationExpressionSymbolInfo);
4508static void assertSymbolInfo(SymbolInfo symbolInfo)
4549var varSymbolInfo = model.GetSymbolInfo(varNode);
4552var declarationExpressionSymbolInfo = model.GetSymbolInfo(declarationExpression);
4553Assert.Equal(SymbolInfo.None, declarationExpressionSymbolInfo);
4586static void assertSymbolInfo(SymbolInfo symbolInfo)
DocumentationComments\CrefTests.cs (29)
1815var info = model.GetSymbolInfo(crefSyntax);
2015var info = model.GetSymbolInfo(crefSyntax);
2054var info = model.GetSymbolInfo(crefSyntax);
2108var info = model.GetSymbolInfo(crefSyntax);
3157var info = model.GetSymbolInfo(crefSyntax);
3180var info = model.GetSymbolInfo(crefSyntax);
3203var info = model.GetSymbolInfo(crefSyntax);
3226var info = model.GetSymbolInfo(crefSyntax);
3250var info = model.GetSymbolInfo(crefSyntax);
3274var info = model.GetSymbolInfo(crefSyntax);
3298var info = model.GetSymbolInfo(crefSyntax);
3322var info = model.GetSymbolInfo(crefSyntax);
3345var info = model.GetSymbolInfo(crefSyntax);
5749var info = model.GetSymbolInfo(parameterType);
5754var containingTypeInfo = model.GetSymbolInfo(parameterTypeContainingType);
5951var info = model.GetSymbolInfo(cref);
6000var info = model.GetSymbolInfo(cref);
6215var info = model.GetSymbolInfo(crefSyntax);
6248var info = model.GetSymbolInfo(parameterSyntax);
6280var symbolInfo = model.GetSymbolInfo(crefName);
6343var crefInfo = model.GetSpeculativeSymbolInfo(crefPosition, accessorName, SpeculativeBindingOption.BindAsExpression);
6344var returnInfo = model.GetSpeculativeSymbolInfo(crefReturnTypePosition, accessorName, SpeculativeBindingOption.BindAsExpression);
6345var paramInfo = model.GetSpeculativeSymbolInfo(crefParameterTypePosition, accessorName, SpeculativeBindingOption.BindAsExpression);
6346var nonCrefInfo = model.GetSpeculativeSymbolInfo(nonCrefPosition, accessorName, SpeculativeBindingOption.BindAsExpression);
6349Assert.Equal(SymbolInfo.None, returnInfo);
6350Assert.Equal(SymbolInfo.None, paramInfo);
6363Assert.Equal(SymbolInfo.None, crefInfo);
6430var info = model.GetSymbolInfo(syntax);
6468var info = model.GetSymbolInfo(syntax);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
Microsoft.CodeAnalysis.CSharp.Workspaces (39)
Recommendations\CSharpRecommendationServiceRunner.cs (10)
533if (name.ShouldNameExpressionBeTreatedAsExpressionInsteadOfType(_context.SemanticModel, out var nameBinding, out var container))
582var boundSymbol = semanticModel.GetSymbolInfo(originalExpression, _cancellationToken);
589var reinterpretedBinding = semanticModel.GetSpeculativeSymbolInfo(identifier.SpanStart, identifier, SpeculativeBindingOption.BindAsTypeOrNamespace);
640var leftHandBinding = _context.SemanticModel.GetSymbolInfo(expression, _cancellationToken);
650var leftHandBinding = _context.SemanticModel.GetSymbolInfo(expression, _cancellationToken);
665var leftHandBinding = _context.SemanticModel.GetSymbolInfo(expression, _cancellationToken);
681SymbolInfo leftHandBinding,
688if (!allowColorColor || !CanAccessInstanceAndStaticMembersOffOf(out var reinterpretedBinding))
697bool CanAccessInstanceAndStaticMembersOffOf(out SymbolInfo reinterpretedBinding)
747private RecommendedSymbols GetSymbolsOffOfBoundExpressionWorker(SymbolInfo leftHandBinding, ExpressionSyntax originalExpression, ExpressionSyntax expression, ITypeSymbol? containerType, bool unwrapNullable, bool isForDereference)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.Features (28)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.VisualBasic (145)
Binding\MemberSemanticModel.vb (33)
812Friend Overrides Function GetAttributeSymbolInfo(attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
824Friend Overrides Function GetExpressionSymbolInfo(node As ExpressionSyntax, options As SymbolInfoOptions, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
833Return SymbolInfo.None
910Friend Overrides Function GetCollectionInitializerAddSymbolInfo(collectionInitializer As ObjectCreationExpressionSyntax, node As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
921Return SymbolInfo.None
924Friend Overrides Function GetCrefReferenceSymbolInfo(crefReference As CrefReferenceSyntax, options As VBSemanticModel.SymbolInfoOptions, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
925Return SymbolInfo.None
928Friend Overrides Function GetQueryClauseSymbolInfo(node As QueryClauseSyntax, Optional cancellationToken As System.Threading.CancellationToken = Nothing) As SymbolInfo
957Return SymbolInfo.None
966Return SymbolInfo.None
972Return SymbolInfo.None
975Friend Overrides Function GetLetClauseSymbolInfo(node As ExpressionRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
983Return SymbolInfo.None
989Return SymbolInfo.None
992Friend Overrides Function GetOrderingSymbolInfo(node As OrderingSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
999Return SymbolInfo.None
1010Return New AggregateClauseSymbolInfo(SymbolInfo.None, SymbolInfo.None)
1013Dim select2 As SymbolInfo = GetSymbolInfoForNode(SymbolInfoOptions.DefaultOptions, New BoundNodeSummary(bound, bound, Nothing), binderOpt:=Nothing)
1022Return New AggregateClauseSymbolInfo(SymbolInfo.None, select2)
1032Return New AggregateClauseSymbolInfo(SymbolInfo.None, SymbolInfo.None)
1050Dim toQueryableCollectionConversion As SymbolInfo = SymbolInfo.None
1051Dim asClauseConversion As SymbolInfo = SymbolInfo.None
1052Dim selectMany As SymbolInfo = SymbolInfo.None
1076toQueryableCollectionConversion = SymbolInfo.None
1082asClauseConversion = SymbolInfo.None
1086asClauseConversion = SymbolInfo.None
1087toQueryableCollectionConversion = SymbolInfo.None
1094selectMany = SymbolInfo.None
Compilation\SemanticModel.vb (28)
58Friend MustOverride Function GetExpressionSymbolInfo(node As ExpressionSyntax, options As SymbolInfoOptions, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
65Friend MustOverride Function GetCollectionInitializerAddSymbolInfo(collectionInitializer As ObjectCreationExpressionSyntax, node As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
72Friend MustOverride Function GetAttributeSymbolInfo(attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
113Friend MustOverride Function GetCrefReferenceSymbolInfo(crefReference As CrefReferenceSyntax, options As SymbolInfoOptions, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
162Public Shadows Function GetSymbolInfo(expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
173Return SymbolInfo.None
181Public Shadows Function GetCollectionInitializerSymbolInfo(expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
196Return SymbolInfo.None
205Public Shadows Function GetSymbolInfo(crefReference As CrefReferenceSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
228Public Shadows Function GetSpeculativeSymbolInfo(position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As SymbolInfo
235Return SymbolInfo.None
252Public Shadows Function GetSpeculativeSymbolInfo(position As Integer, attribute As AttributeSyntax) As SymbolInfo
259Return SymbolInfo.None
263Public Shadows Function GetSymbolInfo(attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
269Return SymbolInfo.None
274Friend Function GetSymbolInfoForNode(options As SymbolInfoOptions, boundNodes As BoundNodeSummary, binderOpt As Binder) As SymbolInfo
533Dim info As SymbolInfo = Me.GetSymbolInfoForNode(SymbolInfoOptions.PreferTypeToConstructors Or SymbolInfoOptions.PreserveAliases, bnodeSummary, binderOpt:=binder)
1515) As SymbolInfo
2753Private Function GetNamedArgumentSymbolInfo(identifierNameSyntax As IdentifierNameSyntax, cancellationToken As CancellationToken) As SymbolInfo
2768Return SymbolInfo.None
2781Dim containingInvocationInfo As SymbolInfo = GetExpressionSymbolInfo(containingInvocation, SymbolInfoOptions.PreferConstructorsToType Or SymbolInfoOptions.ResolveAliases, cancellationToken)
2812containingRaiseEvent As RaiseEventStatementSyntax) As SymbolInfo
2832reason As CandidateReason) As SymbolInfo
2845Return SymbolInfo.None
3085Private Function GetSymbolInfoForNode(node As SyntaxNode, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
3125Return SymbolInfo.None
3170Protected NotOverridable Overrides Function GetSpeculativeSymbolInfoCore(position As Integer, expression As SyntaxNode, bindingOption As SpeculativeBindingOption) As SymbolInfo
3182Protected NotOverridable Overrides Function GetSymbolInfoCore(node As SyntaxNode, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
Compilation\SpeculativeSemanticModelWithMemberModel.vb (7)
217Friend Overrides Function GetAttributeSymbolInfo(attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
229Friend Overrides Function GetExpressionSymbolInfo(node As ExpressionSyntax, options As SymbolInfoOptions, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
249Friend Overrides Function GetCollectionInitializerAddSymbolInfo(collectionInitializer As ObjectCreationExpressionSyntax, node As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
253Friend Overrides Function GetCrefReferenceSymbolInfo(crefReference As CrefReferenceSyntax, options As VBSemanticModel.SymbolInfoOptions, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
257Friend Overrides Function GetQueryClauseSymbolInfo(node As QueryClauseSyntax, Optional cancellationToken As System.Threading.CancellationToken = Nothing) As SymbolInfo
261Friend Overrides Function GetLetClauseSymbolInfo(node As ExpressionRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
265Friend Overrides Function GetOrderingSymbolInfo(node As OrderingSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
Compilation\SyntaxTreeSemanticModel.vb (27)
198Friend Overrides Function GetCrefReferenceSymbolInfo(crefReference As CrefReferenceSyntax, options As VBSemanticModel.SymbolInfoOptions, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
204Friend Overrides Function GetExpressionSymbolInfo(node As ExpressionSyntax, options As SymbolInfoOptions, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
210Dim result As SymbolInfo
252result = SymbolInfo.None
259Friend Overrides Function GetCollectionInitializerAddSymbolInfo(collectionInitializer As ObjectCreationExpressionSyntax, node As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
266Return SymbolInfo.None
269Private Function TryBindNamespaceOrTypeAsExpression(node As ExpressionSyntax, options As SymbolInfoOptions) As SymbolInfo
284Return SymbolInfo.None
377Friend Overrides Function GetAttributeSymbolInfo(attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
383Return SymbolInfo.None
387Friend Overrides Function GetQueryClauseSymbolInfo(node As QueryClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
393Return SymbolInfo.None
397Friend Overrides Function GetLetClauseSymbolInfo(node As ExpressionRangeVariableSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
403Return SymbolInfo.None
407Friend Overrides Function GetOrderingSymbolInfo(node As OrderingSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
413Return SymbolInfo.None
423Return New AggregateClauseSymbolInfo(SymbolInfo.None, SymbolInfo.None)
474Private Function GetSymbolInfoForCrefOrNameAttributeReference(node As VisualBasicSyntaxNode, options As SymbolInfoOptions) As SymbolInfo
480Return SymbolInfo.None
487Dim retValue As SymbolInfo = GetSymbolInfoForSymbol(result(0), options)
642Private Function GetTypeOrNamespaceSymbolInfoNotInMember(expression As TypeSyntax, options As SymbolInfoOptions) As SymbolInfo
653Dim parentInfo As SymbolInfo = GetTypeOrNamespaceSymbolInfoNotInMember(DirectCast(expression.Parent, QualifiedNameSyntax), Nothing)
787Private Function GetImplementedMemberSymbolInfo(memberName As QualifiedNameSyntax, options As SymbolInfoOptions) As SymbolInfo
797Private Function GetHandlesEventSymbolInfo(handlesClause As HandlesClauseItemSyntax, options As SymbolInfoOptions) As SymbolInfo
811Private Function GetHandlesContainerSymbolInfo(handlesClause As HandlesClauseItemSyntax, options As SymbolInfoOptions) As SymbolInfo
825Private Function GetHandlesPropertySymbolInfo(handlesClause As HandlesClauseItemSyntax, options As SymbolInfoOptions) As SymbolInfo
VisualBasicExtensions.vb (16)
1292Public Function GetSymbolInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
1306Public Function GetCollectionInitializerSymbolInfo(semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
1319Public Function GetSymbolInfo(semanticModel As SemanticModel, crefReference As CrefReferenceSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
1332Public Function GetSymbolInfo(semanticModel As SemanticModel, attribute As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo
1345Public Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, position As Integer, expression As ExpressionSyntax, bindingOption As SpeculativeBindingOption) As SymbolInfo
1358Public Function GetSpeculativeSymbolInfo(semanticModel As SemanticModel, position As Integer, attribute As AttributeSyntax) As SymbolInfo
1659''' <description>Returns Select method associated with <see cref="SelectClauseSyntax"/>, or <see cref="SymbolInfo.None"/> if none is.</description>
1666''' <see cref="QueryExpressionSyntax"/>. <see cref="SymbolInfo.None"/> otherwise.
1673''' <description><see cref="SymbolInfo.None"/></description>
1677''' <description><see cref="SymbolInfo.None"/></description>
1682''' <see cref="SymbolInfo.None"/>.
1693) As SymbolInfo
1704''' or <see cref="SymbolInfo.None"/> otherwise if none is.
1711) As SymbolInfo
1728) As SymbolInfo
1745) As SymbolInfo
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (79)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (4)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces (43)
Microsoft.DotNet.CodeAnalysis (1)
Microsoft.ML.InternalCodeAnalyzer (1)
System.Private.CoreLib.Generators (3)