50 references to GetDeclaredSymbol
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
60var symbol = semanticModel.GetDeclaredSymbol(statement);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
470return semanticModel.GetDeclaredSymbol(syntax, cancellationToken)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
CodeGen\CodeGenLocalFunctionTests.cs (4)
5749.GetDeclaredSymbol(syntaxTree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single()) 5824.GetDeclaredSymbol(syntaxTree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single()) 5907var localFunction = semanticModel.GetDeclaredSymbol(localFunctionStatement).GetSymbol<LocalFunctionSymbol>(); 6163var localFunction = model.GetDeclaredSymbol(localFunctionSyntax).GetSymbol<LocalFunctionSymbol>();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
5769var localFunctionSymbol = model.GetDeclaredSymbol(localFunctionSyntax).GetSymbol<LocalFunctionSymbol>();
RefStructInterfacesTests.cs (1)
21249parameter = model.GetDeclaredSymbol(localFunction).GetSymbol<MethodSymbol>().Parameters[0];
Semantics\OutVarTests.cs (3)
36368Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single())); 36450Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single())); 36523Assert.Same(symbolInfo.Symbol, speculativeModel.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Where(l => l.Identifier.ValueText == "M2").Single()));
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (1)
60var symbol = semanticModel.GetDeclaredSymbol(statement);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (25)
Semantics\InitOnlyMemberTests.cs (1)
4144var localFunctionSymbol = model.GetDeclaredSymbol(localFunctionSyntax).GetSymbol<LocalFunctionSymbol>();
Semantics\LocalFunctionTests.cs (6)
503var symbol = (IMethodSymbol)model.GetDeclaredSymbol(localFunction); 551var symbol = (IMethodSymbol)model.GetDeclaredSymbol(localFunction); 815var symbol = (IMethodSymbol)model.GetDeclaredSymbol(localFunction); 971var symbol = (IMethodSymbol)model.GetDeclaredSymbol(localFunction); 2374var local = model.GetDeclaredSymbol(declaration).GetSymbol<MethodSymbol>(); 10386IMethodSymbol methodSymbol = semanticModel.GetDeclaredSymbol(localFunction);
Semantics\NullableReferenceTypesTests.cs (5)
97766var f1 = model.GetDeclaredSymbol(localSyntaxes[0]).GetSymbol<LocalFunctionSymbol>(); 97772var f2 = model.GetDeclaredSymbol(localSyntaxes[1]).GetSymbol<LocalFunctionSymbol>(); 99095var f2 = model.GetDeclaredSymbol(localSyntaxes[0]).GetSymbol<LocalFunctionSymbol>(); 111783var localSymbol = model.GetDeclaredSymbol(localSyntax).GetSymbol<LocalFunctionSymbol>(); 111836var localSymbol = model.GetDeclaredSymbol(localSyntax).GetSymbol<LocalFunctionSymbol>();
Semantics\RefFieldTests.cs (1)
11026var localFunctions = decls.Select(d => model.GetDeclaredSymbol(d).GetSymbol<LocalFunctionSymbol>()).ToArray();
Semantics\TopLevelStatementsTests.cs (12)
236var declSymbol = model1.GetDeclaredSymbol(localDecl); 359var declSymbol = model2.GetDeclaredSymbol(localDecl); 2085var declSymbol = model1.GetDeclaredSymbol(localDecl); 2249var declSymbol = model1.GetDeclaredSymbol(localDecl); 4218var local = model.GetDeclaredSymbol(declarator); 4510var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single()); 4516var symbol2 = model2.GetDeclaredSymbol(tree2.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().First()); 4574var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().First()); 4578var symbol2 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Skip(1).First()); 4623var symbol1 = model1.GetDeclaredSymbol(tree1.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().First()); 6096var localFunction = semanticModel.GetDeclaredSymbol(localFunctionStatement).GetSymbol<LocalFunctionSymbol>(); 6160.GetDeclaredSymbol(syntaxTree.GetRoot().DescendantNodes().OfType<LocalFunctionStatementSyntax>().Single())
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (12)
Symbols\LocalFunctionTests.cs (5)
35var local = semanticModel.GetDeclaredSymbol(localSyntax); 56var local = semanticModel.GetDeclaredSymbol(localSyntax); 77var local = semanticModel.GetDeclaredSymbol(localSyntax); 100var local = semanticModel.GetDeclaredSymbol(localsSyntax[0]).GetSymbol<MethodSymbol>(); 102var staticLocal = semanticModel.GetDeclaredSymbol(localsSyntax[0]).GetSymbol<MethodSymbol>();
Symbols\Source\NullablePublicAPITests.cs (7)
570return syntaxTree.GetRoot().DescendantNodes().OfType<CSharp.Syntax.LocalFunctionStatementSyntax>().Select(func => semanticModel.GetDeclaredSymbol(func)).Cast<IMethodSymbol>().ToArray(); 3665var localFunctionSymbol = (IMethodSymbol)model.GetDeclaredSymbol(localFunction); 3877var localFunctionSymbol = model.GetDeclaredSymbol(localFunction); 4118var localFunctionSymbol = model.GetDeclaredSymbol(localFunction); 4180var localFunctionSymbol = (IMethodSymbol)model.GetDeclaredSymbol(localFunction); 4181var nestedLocalFunction = (IMethodSymbol)model.GetDeclaredSymbol(lambda.DescendantNodes().OfType<LocalFunctionStatementSyntax>().ElementAt(1)); 4936AssertEx.Equal("void M()", model.GetDeclaredSymbol(localFunction).ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
470return semanticModel.GetDeclaredSymbol(syntax, cancellationToken)