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)
543
LocalSymbol thisTemp = (F.
CurrentType
.TypeKind == TypeKind.Class) ? F.SynthesizedLocal(F.
CurrentType
) : null;
604
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)
488
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)
57
Debug.Assert(_factory.
CurrentType
is { });
58
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)
178
get { return ((SynthesizedContainer)F.
CurrentType
).TypeMap; }
Lowering\StateMachineRewriter\StateMachineRewriter.cs (8)
63
Debug.Assert(TypeSymbol.Equals(F.
CurrentType
, method.ContainingType, TypeCompareKind.ConsiderEverything2));
346
var result = new SynthesizedStateMachineDebuggerHiddenMethod(methodName, methodToImplement, (StateMachineTypeSymbol)F.
CurrentType
, null, hasMethodBodyDependency);
347
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, result.GetCciAdapter());
354
var prop = new SynthesizedStateMachineProperty(getterToImplement, (StateMachineTypeSymbol)F.
CurrentType
);
355
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, prop.GetCciAdapter());
358
F.ModuleBuilderOpt.AddSynthesizedDefinition(F.
CurrentType
, getter.GetCciAdapter());
366
var result = new SynthesizedStateMachineMoveNextMethod(methodToImplement, (StateMachineTypeSymbol)F.
CurrentType
);
367
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);