2 writes to TopLevelMethod
Microsoft.CodeAnalysis.CSharp (2)
Lowering\SyntheticBoundNodeFactory.cs (2)
169this.TopLevelMethod = topLevelMethodOpt; 208TopLevelMethod = null;
18 references to TopLevelMethod
Microsoft.CodeAnalysis.CSharp (18)
Lowering\Instrumentation\DebugInfoInjector.cs (1)
170else if (rewriter.Factory.TopLevelMethod is SynthesizedSimpleProgramEntryPointSymbol)
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (5)
293Debug.Assert(_factory.TopLevelMethod is not null); 326new[] { _factory.MethodDefIndex(_factory.TopLevelMethod) }), 329new[] { _factory.MethodDefIndex(_factory.TopLevelMethod), _factory.MethodDefIndex(_factory.CurrentFunction) }), 332new[] { _factory.MethodDefIndex(_factory.TopLevelMethod), _factory.StateMachineInstanceId() }), 335new[] { _factory.MethodDefIndex(_factory.TopLevelMethod), _factory.MethodDefIndex(_factory.CurrentFunction), _factory.StateMachineInstanceId() }),
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
29Debug.Assert(factory.TopLevelMethod is { });
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
54else if (hasImplicitReceiver && _factory.TopLevelMethod is { RequiresInstanceReceiver: false })
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
568Debug.Assert(_factory.TopLevelMethod is { }); 572&& _factory.TopLevelMethod.MethodKind != MethodKind.StaticConstructor // Avoid caching twice if people do it manually.
Lowering\LocalRewriter\LocalRewriter_HostObjectMemberReference.cs (1)
14Debug.Assert(_factory.TopLevelMethod is { IsStatic: false });
Lowering\LocalRewriter\LocalRewriter_PreviousSubmissionReference.cs (1)
16Debug.Assert(_factory.TopLevelMethod is { IsStatic: false });
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (4)
204Debug.Assert(_factory.TopLevelMethod is { }); 207if (hasImplicitReceiver && _factory.TopLevelMethod.RequiresInstanceReceiver) 702Debug.Assert(factory.TopLevelMethod is { }); 709var synthesizedContainer = new DynamicSiteContainer(containerName, factory.TopLevelMethod, factory.CurrentFunction);
Lowering\SyntheticBoundNodeFactory.cs (2)
181Debug.Assert(TopLevelMethod is null || TypeSymbol.Equals(TopLevelMethod.ContainingType, CurrentType, TypeCompareKind.ConsiderEverything2));