2 writes to CurrentType
Microsoft.CodeAnalysis.CSharp (2)
Lowering\SyntheticBoundNodeFactory.cs (2)
121
this.
CurrentType
= currentClassOpt;
162
CurrentType
= nestedType;
40 references to CurrentType
Microsoft.CodeAnalysis.CSharp (40)
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (1)
40
Debug.Assert(TypeSymbol.Equals(factory.
CurrentType
, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2));
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (4)
557
LocalSymbol thisTemp = (F.
CurrentType
.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.
CurrentType
) : null;
618
LocalSymbol thisTemp = (F.
CurrentType
.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.
CurrentType
) : null;
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
172
if (F.
CurrentType
.TypeKind == TypeKind.Class)
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
494
var stateMachineType = (IteratorStateMachine)F.
CurrentType
;
Lowering\LocalRewriter\LocalRewriter.cs (1)
72
Debug.Assert(TypeSymbol.Equals(factory.
CurrentType
, (containingType ?? containingMethod.ContainingType), TypeCompareKind.ConsiderEverything2));
Lowering\LocalRewriter\LocalRewriter_Call.cs (2)
56
Debug.Assert(_factory.
CurrentType
is { });
57
loweredReceiver = new BoundTypeExpression(node.Syntax, null, _factory.
CurrentType
);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
348
containingType: _factory.
CurrentType
,
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (2)
15
Debug.Assert(_factory.
CurrentType
is { });
19
var thisReference = new BoundThisReference(syntax, _factory.
CurrentType
);
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (2)
17
Debug.Assert(_factory.
CurrentType
is { });
23
var thisReference = new BoundThisReference(syntax, _factory.
CurrentType
);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
183
get { return ((SynthesizedContainer)F.
CurrentType
).TypeMap; }
Lowering\StateMachineRewriter\StateMachineRewriter.cs (8)
63
Debug.Assert(TypeSymbol.Equals(F.
CurrentType
, method.ContainingType, TypeCompareKind.ConsiderEverything2));
350
var result = new SynthesizedStateMachineDebuggerHiddenMethod(methodName, methodToImplement, (StateMachineTypeSymbol)F.
CurrentType
, null, hasMethodBodyDependency);
351
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, result.GetCciAdapter());
358
var prop = new SynthesizedStateMachineProperty(getterToImplement, (StateMachineTypeSymbol)F.
CurrentType
);
359
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, prop.GetCciAdapter());
362
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, getter.GetCciAdapter());
370
var result = new SynthesizedStateMachineMoveNextMethod(methodToImplement, (StateMachineTypeSymbol)F.
CurrentType
);
371
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, result.GetCciAdapter());
Lowering\SyntheticBoundNodeFactory.cs (16)
132
if (
CurrentType
is { })
134
Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType,
CurrentType
, TypeCompareKind.ConsiderEverything2));
143
TypeSymbol.Equals(CurrentFunction.ContainingType,
CurrentType
, TypeCompareKind.ConsiderEverything2));
151
ModuleBuilderOpt.AddSynthesizedDefinition(
CurrentType
, nestedType.GetCciAdapter());
172
Debug.Assert(
CurrentType
is { });
173
var result = new StateMachineFieldSymbol(
CurrentType
, type, name, isPublic, isThis);
174
AddField(
CurrentType
, result);
180
Debug.Assert(
CurrentType
is { });
181
var result = new StateMachineFieldSymbol(
CurrentType
, TypeWithAnnotations.Create(type), name, isPublic, isThis);
182
AddField(
CurrentType
, result);
188
Debug.Assert(
CurrentType
is { });
189
var result = new StateMachineFieldSymbol(
CurrentType
, type, name, synthesizedKind, slotIndex, isPublic: false);
190
AddField(
CurrentType
, result);
196
Debug.Assert(
CurrentType
is { });
197
var result = new StateMachineFieldSymbol(
CurrentType
, type, name, slotDebugInfo, slotIndex, isPublic: false);
198
AddField(
CurrentType
, result);