94 references to GetSymbol
Microsoft.CodeAnalysis.CSharp (17)
Compilation\CSharpSemanticModel.cs (4)
4125Symbol symbol = iSymbol.GetSymbol(); 4523ParameterSymbol param = FindNamedParameter(containingInvocationInfo.Symbol.GetSymbol().GetParameters(), argumentName); 4540ParameterSymbol param = FindNamedParameter(invocationSym.GetSymbol().GetParameters(), argumentName); 5162return (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)
64return model.GetDeclaredSymbolForNode(attributedNode).GetSymbol();
Compilation\SyntaxTreeSemanticModel.cs (9)
2214switch (parameterizedSymbol.GetSymbol()) 2471Debug.Assert((object)declaredSymbol.GetSymbol() == (object)entryPoint); 2476Debug.Assert((object)declaredSymbol.GetSymbol() == (object)entryPoint.ContainingSymbol); 2491Debug.Assert((object)declaredSymbol.GetSymbol() == (object)ctor); 2512Debug.Assert((object)declaredSymbol.GetSymbol() == (object)ctor.ContainingSymbol); 2527Debug.Assert((object)declaredSymbol.GetSymbol() == (object)ctor); 2540Debug.Assert((object)declaredSymbol.GetSymbol() == (object)ctor.ContainingSymbol); 2553if ((object)declaredSymbol.GetSymbol() == (object)ctor) 2561Debug.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.Emit3.UnitTests (6)
Diagnostics\GetDiagnosticsTests.cs (1)
479Assert.True(symbol.GetSymbol().IsPartialMember(), "Unexpected multiple symbol declared events for symbol " + symbol);
Semantics\PrimaryConstructorTests.cs (4)
424Assert.Same(x, model.GetDeclaredSymbol(parameters[0]).GetSymbol()); 427Assert.Same(y, model.GetDeclaredSymbol(parameters[1]).GetSymbol()); 1979Assert.Empty(((SynthesizedPrimaryConstructor)symbol.GetSymbol().ContainingSymbol).GetCapturedParameters()); 7843Assert.Same(symbol.GetSymbol(), capturedParameters.Single().Key);
Semantics\RecordTests.cs (1)
22195Assert.Empty(((SynthesizedPrimaryConstructor)symbol.GetSymbol().ContainingSymbol).GetCapturedParameters());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (34)
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\UnsafeTests.cs (6)
7870Assert.Equal(structMethod1, methodGroupSummary.Symbol.GetSymbol()); 7879Assert.Equal(structMethod1, callSummary.Symbol.GetSymbol()); 7937Assert.Equal(structMethod1, methodGroupSummary.Symbol.GetSymbol()); // Have enough info for overload resolution. 7944Assert.Equal(structMethod1, callSummary.Symbol.GetSymbol()); // Have enough info for overload resolution. 10248Assert.Equal(arraySymbol, summary1.Symbol.GetSymbol()); 10317Assert.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.IsAssignableFrom<SourceOrdinaryMethodSymbol>(info.Symbol.GetSymbol()); 4148Assert.IsType<ReducedExtensionMethodSymbol>(info.Symbol.GetSymbol());
Compilation\SemanticModelGetSemanticInfoTests.cs (6)
4684Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 4721Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 4757Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 4793Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 4825Assert.IsAssignableFrom<SourceEnumConstantSymbol>(symbol.GetSymbol()); 5549Assert.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)
3614Assert.Equal(expected, symbolInfo.Symbol.GetSymbol());
Symbols\Source\PropertyTests.cs (1)
713var 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)
2384return VisualizeRealIL((PEModuleSymbol)peModule.GetSymbol(), methodData, markers, areLocalsZeroed);