94 references to GetSymbol
Microsoft.CodeAnalysis.CSharp (17)
Compilation\CSharpSemanticModel.cs (4)
4098Symbol symbol = iSymbol.GetSymbol(); 4489ParameterSymbol param = FindNamedParameter(containingInvocationInfo.Symbol.GetSymbol().GetParameters(), argumentName); 4506ParameterSymbol param = FindNamedParameter(invocationSym.GetSymbol().GetParameters(), argumentName); 5133return (GetSymbolInfo(tupleTypeSyntax, cancellationToken).Symbol.GetSymbol() as NamedTypeSymbol)?.TupleElements.ElementAtOrDefault(tupleTypeSyntax.Elements.IndexOf(declarationSyntax)).GetPublicSymbol();
Compilation\PublicSemanticModel.cs (2)
44DelegateDeclarationSyntax => GetDeclaredSymbolForNode(targetSyntax).GetSymbol(), 45AnonymousFunctionExpressionSyntax anonymousFunction => GetSymbolInfo(anonymousFunction).Symbol.GetSymbol(),
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
63return model.GetDeclaredSymbolForNode(attributedNode).GetSymbol();
Compilation\SyntaxTreeSemanticModel.cs (9)
2153switch (parameterizedSymbol.GetSymbol()) 2414Debug.Assert((object)declaredSymbol.GetSymbol() == (object)entryPoint); 2419Debug.Assert((object)declaredSymbol.GetSymbol() == (object)entryPoint.ContainingSymbol); 2434Debug.Assert((object)declaredSymbol.GetSymbol() == (object)ctor); 2455Debug.Assert((object)declaredSymbol.GetSymbol() == (object)ctor.ContainingSymbol); 2470Debug.Assert((object)declaredSymbol.GetSymbol() == (object)ctor); 2483Debug.Assert((object)declaredSymbol.GetSymbol() == (object)ctor.ContainingSymbol); 2496if ((object)declaredSymbol.GetSymbol() == (object)ctor) 2504Debug.Assert(declaredSymbol.GetSymbol() is SynthesizedRecordPropertySymbol);
FlowAnalysis\DataFlowsOutWalker.cs (1)
80Symbol variableSymbol = variable.GetSymbol();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenDeconstructTests.cs (1)
7069var symbol = (DiscardSymbol)model.GetSymbolInfo(discard).Symbol.GetSymbol();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Diagnostics\GetDiagnosticsTests.cs (1)
288var method = symbol.GetSymbol() as Symbols.MethodSymbol;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (39)
Semantics\AccessCheckTests.cs (14)
775Assert.True(Symbol.IsSymbolAccessible(pubField.GetSymbol(), classB.GetSymbol())); 777Assert.False(Symbol.IsSymbolAccessible(privField.GetSymbol(), classB.GetSymbol())); 795Assert.False(Symbol.IsSymbolAccessible(kdiscard.GetSymbol(), classB.GetSymbol())); 797Assert.True(Symbol.IsSymbolAccessible(adiscard.GetSymbol(), classB.GetSymbol())); 805Assert.True(Symbol.IsSymbolAccessible(globalNS.GetSymbol(), classB.GetSymbol())); 807Assert.True(Symbol.IsSymbolAccessible(protField.GetSymbol(), classA.GetSymbol())); 809Assert.True(Symbol.IsSymbolAccessible(protField.GetSymbol(), classA.GetSymbol(), classADerived.GetSymbol())); 811Assert.False(Symbol.IsSymbolAccessible(protField.GetSymbol(), classB.GetSymbol())); 813Assert.False(Symbol.IsSymbolAccessible(protField.GetSymbol(), classB.GetSymbol(), classADerived.GetSymbol())); 815Assert.True(Symbol.IsSymbolAccessible(protField.GetSymbol(), classA.GetSymbol())); 817Assert.True(Symbol.IsSymbolAccessible(protField.GetSymbol(), classADerived.GetSymbol(), classADerived.GetSymbol())); 819Assert.False(Symbol.IsSymbolAccessible(protField.GetSymbol(), classADerived.GetSymbol(), classADerived2.GetSymbol())); 842Assert.True(Symbol.IsSymbolAccessible(adiscard.GetSymbol(), sourceAssem.GetSymbol())); 844Assert.False(Symbol.IsSymbolAccessible(kdiscard.GetSymbol(), sourceAssem.GetSymbol()));
Semantics\ExpressionBodiedMemberTests.cs (7)
84Assert.Equal(field, semanticSymbol.GetSymbol()); 124var sym = Assert.IsType<SourcePropertySymbol>(info.Symbol.GetSymbol()); 209var accessor = Assert.IsType<SourcePropertyAccessorSymbol>(sym.ContainingSymbol.GetSymbol()); 236Assert.Equal(i, semanticSymbol.GetSymbol()); 266Assert.Equal(m, semanticInfo.Type.ContainingSymbol.GetSymbol()); 292Assert.Equal(p, semanticSymbol.GetSymbol()); 325Assert.Equal(p, semanticSymbol.GetSymbol());
Semantics\InteractiveSemanticModelTests.cs (1)
129Assert.IsAssignableFrom<SourceLocalSymbol>(symbol.GetSymbol());
Semantics\LocalFunctionTests.cs (2)
1926var localSymbol = Assert.IsType<LocalFunctionSymbol>(model.GetDeclaredSymbol(localDecl.AsNode()).GetSymbol()); 1976var localSymbol = Assert.IsType<LocalFunctionSymbol>(model.GetDeclaredSymbol(localDecl.AsNode()).GetSymbol());
Semantics\LookupTests.cs (4)
40return model.LookupSymbols(position, container.GetPublicSymbol(), name).Where(s => !arity.HasValue || arity == s.GetSymbol().GetMemberArity()).ToList(); 2018Assert.Equal(symbolInfo.Symbol.GetSymbol(), m); 2048Assert.Equal(symbolInfo.Symbol.GetSymbol(), m); 2078Assert.Equal(symbolInfo.Symbol.GetSymbol(), m);
Semantics\PrimaryConstructorTests.cs (4)
388Assert.Same(x, model.GetDeclaredSymbol(parameters[0]).GetSymbol()); 391Assert.Same(y, model.GetDeclaredSymbol(parameters[1]).GetSymbol()); 1870Assert.Empty(((SynthesizedPrimaryConstructor)symbol.GetSymbol().ContainingSymbol).GetCapturedParameters()); 7227Assert.Same(symbol.GetSymbol(), capturedParameters.Single().Key);
Semantics\RecordTests.cs (1)
22101Assert.Empty(((SynthesizedPrimaryConstructor)symbol.GetSymbol().ContainingSymbol).GetCapturedParameters());
Semantics\UnsafeTests.cs (6)
5032Assert.Equal(structMethod1, methodGroupSummary.Symbol.GetSymbol()); 5041Assert.Equal(structMethod1, callSummary.Symbol.GetSymbol()); 5099Assert.Equal(structMethod1, methodGroupSummary.Symbol.GetSymbol()); // Have enough info for overload resolution. 5106Assert.Equal(structMethod1, callSummary.Symbol.GetSymbol()); // Have enough info for overload resolution. 7410Assert.Equal(arraySymbol, summary1.Symbol.GetSymbol()); 7479Assert.Equal(arraySymbol, summary1.Symbol.GetSymbol());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (35)
Compilation\SemanticModelAPITests.cs (2)
1309Assert.IsType<MissingNamespaceSymbol>(aliasSymbol.Target.GetSymbol()); 2053Assert.IsType<ThisParameterSymbol>(candidates[0].GetSymbol());
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (7)
386Assert.IsType<SourceCustomEventSymbol>(eventSymbol.GetSymbol()); 413Assert.IsType<SourceFieldLikeEventSymbol>(eventSymbol.GetSymbol()); 723var labelSymbol = (SourceLabelSymbol)symbol.GetSymbol(); 755var labelSymbol = (SourceLabelSymbol)symbol1.GetSymbol(); 3744Assert.IsType<MergedNamespaceSymbol>(declSymbol.GetSymbol()); 4131Assert.IsType<SourceOrdinaryMethodSymbol>(info.Symbol.GetSymbol()); 4148Assert.IsType<ReducedExtensionMethodSymbol>(info.Symbol.GetSymbol());
Compilation\SemanticModelGetSemanticInfoTests.cs (6)
4689Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 4726Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 4762Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 4798Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 4830Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 5554Assert.True(semanticInfo.Symbol.GetSymbol().IsFromCompilation(compilation));
DocumentationComments\CrefTests.cs (2)
5755Assert.IsType<CrefTypeParameterSymbol>(containingTypeInfo.Symbol.GetSymbol()); 5805Assert.IsType<CrefTypeParameterSymbol>(typeSymbol.GetSymbol());
Symbols\AnonymousTypesSymbolTests.cs (2)
1644Assert.True(sym.Symbol.GetSymbol().IsFromCompilation(comp), "IsFromCompilation"); 1653Assert.True(m.GetSymbol().IsFromCompilation(comp), "IsFromCompilation");
Symbols\Source\DeclaringSyntaxNodeTests.cs (6)
32Assert.True(!symbol.GetSymbol().IsFromCompilation((CSharpCompilation)compilation) || symbol.IsImplicitlyDeclared, "non-implicitly declares source symbol should have declaring location"); 36Assert.True(symbol.GetSymbol().IsFromCompilation((CSharpCompilation)compilation) || symbol.GetSymbol() is MergedNamespaceSymbol, "symbol with declaration should be in source, except for merged namespaces"); 87Assert.True(!symbol.GetSymbol().IsFromCompilation((CSharpCompilation)compilation) || symbol.IsImplicitlyDeclared, "non-implicitly declares source symbol should have declaring location"); 91Assert.True(symbol.GetSymbol().IsFromCompilation((CSharpCompilation)compilation) || symbol.GetSymbol() is MergedNamespaceSymbol, "symbol with declaration should be in source, except for merged namespaces");
Symbols\Source\ExternAliasTests.cs (2)
416Assert.IsType<MergedNamespaceSymbol>(firstTarget.GetSymbol()); 442Assert.IsType<MissingNamespaceSymbol>(firstTarget.GetSymbol());
Symbols\Source\FileModifierTests.cs (1)
3056Assert.Equal(expected, symbolInfo.Symbol.GetSymbol());
Symbols\Source\PropertyTests.cs (1)
712var type = (PENamedTypeSymbol)verifier.Compilation.GlobalNamespace.GetMembers("Signatures").Single().GetSymbol();
Symbols\SymbolEqualityTests.cs (6)
129Assert.IsType<ConstructedMethodSymbol>(nonNullM.GetSymbol()); 130Assert.IsType<ConstructedMethodSymbol>(nullM.GetSymbol()); 135Assert.IsType<LocalFunctionSymbol>(nonNullOriginal.GetSymbol()); 136Assert.IsType<LocalFunctionSymbol>(nullOriginal.GetSymbol()); 173Assert.IsType<SubstitutedMethodSymbol>(nonNullSubstituted.GetSymbol()); 174Assert.IsType<SubstitutedMethodSymbol>(nullSubstituted.GetSymbol());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1793return VisualizeRealIL((PEModuleSymbol)peModule.GetSymbol(), methodData, markers, areLocalsZeroed);