70 references to GetDeclaredSymbol
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
476return semanticModel.GetDeclaredSymbol(syntax, cancellationToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
256var parameterSymbol = model.GetDeclaredSymbol(optionalParameter, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (13)
RefStructInterfacesTests.cs (3)
21709var p = model.GetDeclaredSymbol(lambdas[0].ParameterList.Parameters[0]).GetSymbol<ParameterSymbol>(); 21713p = model.GetDeclaredSymbol(lambdas[1].ParameterList.Parameters[0]).GetSymbol<ParameterSymbol>(); 21717p = model.GetDeclaredSymbol(lambdas[2].ParameterList.Parameters[0]).GetSymbol<ParameterSymbol>();
Semantics\ParamsCollectionTests.cs (7)
2757var parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 2791parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 2955var parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 2986parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Single()); 4340var parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().First()); 4346parameter = (IParameterSymbol)model.GetDeclaredSymbol(tree.GetRoot().DescendantNodes().OfType<ParameterSyntax>().Skip(1).First()); 9073return model.GetDeclaredSymbol(parameterDecl).GetSymbol<ParameterSymbol>();
Semantics\PrimaryConstructorTests.cs (2)
423Assert.Same(x, model.GetDeclaredSymbol(parameters[0]).GetSymbol()); 426Assert.Same(y, model.GetDeclaredSymbol(parameters[1]).GetSymbol());
Semantics\RecordTests.cs (1)
449var parameter = model.GetDeclaredSymbol(parameterSyntax)!;
Microsoft.CodeAnalysis.CSharp.Features (2)
InlineHints\CSharpInlineTypeHintsService.cs (1)
81var parameter = semanticModel.GetDeclaredSymbol(parameterNode, cancellationToken);
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
256var parameterSymbol = model.GetDeclaredSymbol(optionalParameter, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (17)
Semantics\LambdaDiscardParametersTests.cs (3)
113var symbol1 = model.GetDeclaredSymbol(underscore); 569var parameterSymbol1 = model.GetDeclaredSymbol(underscoreParameters[0]); 573var parameterSymbol2 = model.GetDeclaredSymbol(underscoreParameters[1]);
Semantics\LambdaTests.cs (6)
2667var parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[0]); 2670parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[1]); 2673parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[3]); 2680parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[0]); 2683parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[2]); 3016symbol = model.GetDeclaredSymbol(parameterSyntax);
Semantics\LocalFunctionTests.cs (3)
854var paramSymbol = model.GetDeclaredSymbol(parameter); 4728Assert.Equal("[System.Int32 n = 2]", model.GetDeclaredSymbol(parameter).ToTestDisplayString()); 5118var parameterSymbol = model.GetDeclaredSymbol(parameter);
Semantics\RecordStructTests.cs (1)
5850var parameter = model.GetDeclaredSymbol(parameterSyntax)!;
Semantics\RefFieldTests.cs (4)
16730Assert.Equal("R<U> r1", model.GetDeclaredSymbol(lambdas[0].ParameterList.Parameters[0]).ToTestDisplayString()); 16733Assert.Equal("U t1", model.GetDeclaredSymbol(lambdas[0].ParameterList.Parameters[1]).ToTestDisplayString()); 16737Assert.Equal("R<U> r2", model.GetDeclaredSymbol(lambdas[1].ParameterList.Parameters[0]).ToTestDisplayString()); 16740Assert.Equal("U t2", model.GetDeclaredSymbol(lambdas[1].ParameterList.Parameters[1]).ToTestDisplayString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (30)
Compilation\GetSemanticInfoTests.cs (5)
2357var parameterSymbol = model.GetDeclaredSymbol(lambdaSyntax.Parameter); 2567var declaredSymbol = model.GetDeclaredSymbol(expr); 4402var symbol = model.GetDeclaredSymbol(syntax); // Doesn't assert. 4760model.GetDeclaredSymbol(parameterSyntax); 5485var parameterSymbol = model.GetDeclaredSymbol(parameterSyntax);
Compilation\SemanticModelAPITests.cs (9)
354var symbol1 = model1.GetDeclaredSymbol(paramdecl); 355var symbol2 = model2.GetDeclaredSymbol(paramdecl); 376var symbol1 = model1.GetDeclaredSymbol(paramdecl1); 378var symbol2 = model2.GetDeclaredSymbol(paramdecl2); 968var sym1 = model1.GetDeclaredSymbol(para1); 969var sym2 = model2.GetDeclaredSymbol(para2); 1197var parasym = model.GetDeclaredSymbol(paras.First()); 1964var parameterSymbol = speculativeModel.GetDeclaredSymbol(lambdaParam); 2685var parameterSymbol = speculativeModel.GetDeclaredSymbol(lambdaParam);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (11)
824var symbol = model.GetDeclaredSymbol(methodDecl.ParameterList.Parameters[0]); 840var symbol = model.GetDeclaredSymbol(delegateDecl.ParameterList.Parameters[0]); 860var symbol = model.GetDeclaredSymbol(methodDecl.ParameterList.Parameters[0]); 864symbol = model.GetDeclaredSymbol(methodDecl.ParameterList.Parameters[1]); 987var psym = model.GetDeclaredSymbol(memDecl.ParameterList.Parameters[0]); 1334var paramSymbol = model.GetDeclaredSymbol(parameterDecl); 1346paramSymbol = model.GetDeclaredSymbol(parameterDecl); 1437var paramSymbol = model.GetDeclaredSymbol(parameterDecl); 1451paramSymbol = model.GetDeclaredSymbol(parameterDecl); 3902var symbol = model.GetDeclaredSymbol(param); 5650var symbol = (IParameterSymbol)model.GetDeclaredSymbol(decl);
Symbols\Source\EventTests.cs (2)
442var parameterSymbol = model.GetDeclaredSymbol(parameterSyntax); 488var parameterSymbol = model.GetDeclaredSymbol(parameterSyntax);
Symbols\Source\NullablePublicAPITests.cs (2)
3811var paramSymbol = model.GetDeclaredSymbol(parameter); 4049var o1Symbol = model.GetDeclaredSymbol(o1Decl);
Symbols\SymbolEqualityTests.cs (1)
942var p2 = semanticModel2.GetDeclaredSymbol(lambdaSyntax.Parameter);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (1)
37var symbol = semanticModel.GetDeclaredSymbol(parameter, cancellationToken);
Simplification\CSharpSimplificationService.Expander.cs (2)
178.Select(p => _semanticModel.GetDeclaredSymbol(p, _cancellationToken)) 223var parameterSymbol = _semanticModel.GetDeclaredSymbol(node.Parameter);
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
53var oldSymbol = semanticModel.GetDeclaredSymbol(parameterSyntax, cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
476return semanticModel.GetDeclaredSymbol(syntax, cancellationToken)
Microsoft.Gen.ComplianceReports (1)
Parser.cs (1)
112var ps = sm.GetDeclaredSymbol(parameter);