4 types derived from SourceLocalSymbol
Microsoft.CodeAnalysis.CSharp (4)
Symbols\Source\SourceLocalSymbol.cs (4)
513
private sealed class LocalWithInitializer :
SourceLocalSymbol
605
private sealed class ForEachLocalSymbol :
SourceLocalSymbol
644
private sealed class DeconstructionLocalSymbol :
SourceLocalSymbol
707
private sealed class LocalSymbolWithEnclosingContext :
SourceLocalSymbol
3 instantiations of SourceLocalSymbol
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Source\SourceLocalSymbol.cs (3)
150
: new
SourceLocalSymbol
(containingSymbol, scopeBinder, allowRefKind: false, allowScoped: true, closestTypeSyntax, identifierToken, kind);
181
: new
SourceLocalSymbol
(containingSymbol, scopeBinder, allowRefKind: false, allowScoped: true, typeSyntax, identifierToken, kind);
215
: new
SourceLocalSymbol
(containingSymbol, scopeBinder, allowRefKind: allowRefKind, allowScoped: allowScoped, typeSyntax, identifierToken, declarationKind);
82 references to SourceLocalSymbol
Microsoft.CodeAnalysis.CSharp (65)
Binder\Binder.ValueChecks.cs (5)
2387
private bool ShouldInferDeclarationExpressionValEscape(BoundExpression argument, [NotNullWhen(true)] out
SourceLocalSymbol
? localSymbol)
2395
if (symbol is
SourceLocalSymbol
local &&
2406
Debug.Assert(symbol is null or
SourceLocalSymbol
or GlobalExpressionVariable);
2504
if (ShouldInferDeclarationExpressionValEscape(argument, out
var
localSymbol))
2599
if (ShouldInferDeclarationExpressionValEscape(argument, out
var
localSymbol))
Binder\Binder_Deconstruct.cs (1)
870
SourceLocalSymbol
localSymbol = LookupLocal(designation.Identifier);
Binder\Binder_Expressions.cs (2)
1879
else if ((localSymbol as
SourceLocalSymbol
)?.IsVar == true && localSymbol.ForbiddenZone?.Contains(node) == true)
2935
SourceLocalSymbol
localSymbol = this.LookupLocal(designation.Identifier);
Binder\Binder_Patterns.cs (1)
870
SourceLocalSymbol
localSymbol = this.LookupLocal(identifier);
Binder\Binder_Statements.cs (6)
976
SourceLocalSymbol
localSymbol,
1203
private
SourceLocalSymbol
LocateDeclaredVariableSymbol(VariableDeclaratorSyntax declarator, TypeSyntax typeSyntax, LocalDeclarationKind outerKind)
1209
private
SourceLocalSymbol
LocateDeclaredVariableSymbol(SyntaxToken identifier, TypeSyntax typeSyntax, EqualsValueClauseSyntax equalsValue, LocalDeclarationKind kind)
1211
SourceLocalSymbol
localSymbol = this.LookupLocal(identifier);
1217
localSymbol =
SourceLocalSymbol
.MakeLocal(
1839
protected virtual
SourceLocalSymbol
LookupLocal(SyntaxToken nameToken)
Binder\BuckStopsHereBinder.cs (1)
53
protected override
SourceLocalSymbol
? LookupLocal(SyntaxToken nameToken)
Binder\CatchClauseBinder.cs (1)
34
locals.Add(
SourceLocalSymbol
.MakeLocal(this.ContainingMemberOrLambda, this, allowRefKind: false, allowScoped: false, declarationOpt.Type, declarationOpt.Identifier, LocalDeclarationKind.CatchVariable, initializer: null));
Binder\ExpressionVariableFinder.cs (3)
550
return
SourceLocalSymbol
.MakeLocalSymbolWithEnclosingContext(
572
return
SourceLocalSymbol
.MakeLocalSymbolWithEnclosingContext(
597
return
SourceLocalSymbol
.MakeDeconstructionLocal(
Binder\ForEachLoopBinder.cs (7)
36
private
SourceLocalSymbol
IterationVariable
40
return (_syntax.Kind() == SyntaxKind.ForEachStatement) ? (
SourceLocalSymbol
)this.Locals[0] : null;
72
var
iterationVariable =
SourceLocalSymbol
.MakeForeachLocal(
134
SourceLocalSymbol
localSymbol =
SourceLocalSymbol
.MakeDeconstructionLocal(
298
SourceLocalSymbol
local = this.IterationVariable;
Binder\ForLoopBinder.cs (1)
48
var
localSymbol = MakeLocal(_syntax.Declaration, vdecl, LocalDeclarationKind.RegularVariable, allowScoped: true);
Binder\InContainerBinder.cs (1)
136
protected override
SourceLocalSymbol
LookupLocal(SyntaxToken nameToken)
Binder\InMethodBinder.cs (1)
59
protected override
SourceLocalSymbol
LookupLocal(SyntaxToken nameToken)
Binder\LocalScopeBinder.cs (6)
215
var
localSymbol = MakeLocal(decl.Declaration, vdecl, kind, allowScoped: true, localDeclarationBinder);
285
protected
SourceLocalSymbol
MakeLocal(VariableDeclarationSyntax declaration, VariableDeclaratorSyntax declarator, LocalDeclarationKind kind, bool allowScoped, Binder initializerBinderOpt = null)
287
return
SourceLocalSymbol
.MakeLocal(
335
protected override
SourceLocalSymbol
LookupLocal(SyntaxToken nameToken)
340
if (result.IdentifierToken == nameToken) return (
SourceLocalSymbol
)result;
347
return (
SourceLocalSymbol
)local;
Binder\RefSafetyAnalysis.cs (2)
428
var
localSymbol = (
SourceLocalSymbol
)node.LocalSymbol;
Binder\WithExternAliasesBinder.cs (1)
62
protected sealed override
SourceLocalSymbol
? LookupLocal(SyntaxToken nameToken)
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
218
protected override
SourceLocalSymbol
? LookupLocal(SyntaxToken nameToken)
BoundTree\NullabilityRewriter.cs (2)
98
case
SourceLocalSymbol
local:
143
Symbol remapLocal(
SourceLocalSymbol
local)
BoundTree\VariablePendingInference.cs (2)
51
var
localSymbol = (
SourceLocalSymbol
)this.VariableSymbol;
Compilation\CSharpSemanticModel.cs (2)
3275
return (local is
SourceLocalSymbol
{ DeclarationKind: LocalDeclarationKind.ForEachIterationVariable } sourceLocal
3287
internal abstract LocalSymbol GetAdjustedLocalSymbol(
SourceLocalSymbol
originalSymbol);
Compilation\MemberSemanticModel.cs (2)
690
return GetAdjustedLocalSymbol((
SourceLocalSymbol
)local);
699
internal override LocalSymbol GetAdjustedLocalSymbol(
SourceLocalSymbol
local)
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
336
internal override LocalSymbol GetAdjustedLocalSymbol(
SourceLocalSymbol
local)
Compilation\SyntaxTreeSemanticModel.cs (1)
1857
internal override LocalSymbol GetAdjustedLocalSymbol(
SourceLocalSymbol
originalSymbol)
FlowAnalysis\DefiniteAssignment.cs (1)
2190
if ((localSymbol as
SourceLocalSymbol
)?.IsVar == true && localSymbol.ForbiddenZone?.Contains(node.Syntax) == true)
FlowAnalysis\NullableWalker.cs (2)
2943
if (local is
SourceLocalSymbol
{ IsVar: true } && local.ForbiddenZone?.Contains(node.Syntax) == true)
10193
else if (iterationVariable is
SourceLocalSymbol
{ IsVar: true })
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
63
internal TypeWithAnnotations? GetUpdatedTypeForLocalSymbol(
SourceLocalSymbol
symbol)
FlowAnalysis\NullableWalker_Patterns.cs (1)
641
if (variableAccess is BoundLocal { LocalSymbol:
SourceLocalSymbol
local } boundLocal)
Symbols\Source\SourceLocalSymbol.cs (4)
109
public static
SourceLocalSymbol
MakeForeachLocal(
136
public static
SourceLocalSymbol
MakeDeconstructionLocal(
201
public static
SourceLocalSymbol
MakeLocal(
500
return obj is
SourceLocalSymbol
symbol
Symbols\UpdatedContainingSymbolLocal.cs (6)
18
internal static UpdatedContainingSymbolAndNullableAnnotationLocal CreateForTest(
SourceLocalSymbol
underlyingLocal, Symbol updatedContainingSymbol, TypeWithAnnotations updatedType)
23
private UpdatedContainingSymbolAndNullableAnnotationLocal(
SourceLocalSymbol
underlyingLocal, Symbol updatedContainingSymbol, TypeWithAnnotations updatedType, bool assertContaining)
34
internal UpdatedContainingSymbolAndNullableAnnotationLocal(
SourceLocalSymbol
underlyingLocal, Symbol updatedContainingSymbol, TypeWithAnnotations updatedType)
39
private readonly
SourceLocalSymbol
_underlyingLocal;
55
SourceLocalSymbol
? otherSource = otherLocal switch
58
SourceLocalSymbol
source => source,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenDeconstructTests.cs (2)
3586
var
local = symbol.GetSymbol<
SourceLocalSymbol
>();
CodeGen\CodeGenTupleTest.cs (1)
1616
var xSymbol = model.GetDeclaredSymbol(x).GetSymbol<
SourceLocalSymbol
>().Type;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\InteractiveSemanticModelTests.cs (1)
129
Assert.IsAssignableFrom<
SourceLocalSymbol
>(symbol.GetSymbol());
Semantics\OutVarTests.cs (2)
1176
var
local = symbol.GetSymbol<
SourceLocalSymbol
>();
Semantics\RefFieldTests.cs (7)
12949
foreach (
SourceLocalSymbol
local in locals)
13013
foreach (
SourceLocalSymbol
local in locals)
13087
var locals = decls.Select(d => model.GetDeclaredSymbol(d).GetSymbol<
SourceLocalSymbol
>()).ToArray();
13160
foreach (
SourceLocalSymbol
local in locals)
14642
foreach (
SourceLocalSymbol
local in locals)
26651
foreach (
SourceLocalSymbol
local in locals)
26711
foreach (
SourceLocalSymbol
local in locals)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Symbols\Source\UpdatedContainingSymbolAndNullableAnntotationTests.cs (4)
38
var
local1 = model.GetDeclaredSymbol(varDeclarators.First()).GetSymbol<
SourceLocalSymbol
>();
39
var
local2 = model.GetDeclaredSymbol(varDeclarators.ElementAt(1)).GetSymbol<
SourceLocalSymbol
>();