62 references to GetDeclaredSymbol
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
SpeculationAnalyzer.cs (2)
254var originalParamType = this.OriginalSemanticModel.GetDeclaredSymbol(originalParam).Type; 255var replacedParamType = this.SpeculativeSemanticModel.GetDeclaredSymbol(replacedParam).Type;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
CSharpDeclareAsNullableCodeFixProvider.cs (1)
274var parameterSymbol = model.GetDeclaredSymbol(optionalParameter, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Features (2)
CSharpDeclareAsNullableCodeFixProvider.cs (1)
274var parameterSymbol = model.GetDeclaredSymbol(optionalParameter, cancellationToken);
InlineHints\CSharpInlineTypeHintsService.cs (1)
81var parameter = semanticModel.GetDeclaredSymbol(parameterNode, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (20)
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)
2663var parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[0]); 2666parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[1]); 2669parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[3]); 2676parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[0]); 2679parameter = (IParameterSymbol)sm.GetDeclaredSymbol(parameters[2]); 3012symbol = model.GetDeclaredSymbol(parameterSyntax);
Semantics\LocalFunctionTests.cs (3)
854var paramSymbol = model.GetDeclaredSymbol(parameter); 4646Assert.Equal("[System.Int32 n = 2]", model.GetDeclaredSymbol(parameter).ToTestDisplayString()); 5036var parameterSymbol = model.GetDeclaredSymbol(parameter);
Semantics\PrimaryConstructorTests.cs (2)
388Assert.Same(x, model.GetDeclaredSymbol(parameters[0]).GetSymbol()); 391Assert.Same(y, model.GetDeclaredSymbol(parameters[1]).GetSymbol());
Semantics\RecordStructTests.cs (1)
5820var parameter = model.GetDeclaredSymbol(parameterSyntax)!;
Semantics\RecordTests.cs (1)
449var parameter = model.GetDeclaredSymbol(parameterSyntax)!;
Semantics\RefFieldTests.cs (4)
16240Assert.Equal("R<U> r1", model.GetDeclaredSymbol(lambdas[0].ParameterList.Parameters[0]).ToTestDisplayString()); 16243Assert.Equal("U t1", model.GetDeclaredSymbol(lambdas[0].ParameterList.Parameters[1]).ToTestDisplayString()); 16247Assert.Equal("R<U> r2", model.GetDeclaredSymbol(lambdas[1].ParameterList.Parameters[0]).ToTestDisplayString()); 16250Assert.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); 5280var 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)
3812var paramSymbol = model.GetDeclaredSymbol(parameter); 4050var o1Symbol = model.GetDeclaredSymbol(o1Decl);
Symbols\SymbolEqualityTests.cs (1)
942var p2 = semanticModel2.GetDeclaredSymbol(lambdaSyntax.Parameter);
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Classification\SyntaxClassification\DiscardSyntaxClassifier.cs (1)
38var symbol = semanticModel.GetDeclaredSymbol(parameter, cancellationToken);
Simplification\CSharpSimplificationService.Expander.cs (2)
176.Select(p => _semanticModel.GetDeclaredSymbol(p, _cancellationToken)) 221var parameterSymbol = _semanticModel.GetDeclaredSymbol(node.Parameter);
Simplification\Reducers\CSharpMiscellaneousReducer.cs (2)
55var oldSymbol = semanticModel.GetDeclaredSymbol(parameterSyntax, cancellationToken); 56var newSymbol = speculationAnalyzer.SpeculativeSemanticModel.GetDeclaredSymbol(newParameterSyntax, cancellationToken);
SpeculationAnalyzer.cs (2)
254var originalParamType = this.OriginalSemanticModel.GetDeclaredSymbol(originalParam).Type; 255var replacedParamType = this.SpeculativeSemanticModel.GetDeclaredSymbol(replacedParam).Type;