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