34 if (internalCurrent !=
null)
45 if (flowExecutionContext)
59 internal override void Run(
Task task,
bool canInlineContinuationTask)
79 if (!log.
IsEnabled() && capturedContext ==
null)
84 Guid oldActivityThatWillContinue =
default(
Guid);
92 if (capturedContext ==
null || capturedContext.
IsDefault)
126 if (capturedContext ==
null)
158 if (t_currentTask !=
null)
160 Task.t_currentTask =
null;
170 if (t_currentTask !=
null)
172 Task.t_currentTask = t_currentTask;
194 if (t_currentTask !=
null)
196 Task.t_currentTask =
null;
206 if (t_currentTask !=
null)
208 Task.t_currentTask = t_currentTask;
217 if (log.IsEnabled() &&
task !=
null)
219 awaitTaskContinuation.m_continuationId =
Task.
NewId();
static void SetCurrentThreadActivityId(Guid activityId)
static Action TryGetStateMachineForDebugger(Action action)
static void RunInternal(ExecutionContext executionContext, ContextCallback callback, object state)
static ? ExecutionContext Capture()
static ? SynchronizationContext Current
override Delegate[] GetDelegateContinuationsForDebugger()
static void RunOrScheduleAction(Action action, bool allowInlining)
override void Run(Task task, bool canInlineContinuationTask)
static readonly ContextCallback s_invokeContextCallback
static readonly Action< Action > s_invokeAction
void RunCallback(ContextCallback callback, object state, ref Task currentTask)
Task CreateTask(Action< object > action, object state, TaskScheduler scheduler)
static bool IsValidLocationForInlining
readonly ExecutionContext m_capturedContext
static void UnsafeScheduleAction(Action action, Task task)
AwaitTaskContinuation(Action action, bool flowExecutionContext)
static void RunOrScheduleAction(IAsyncStateMachineBox box, bool allowInlining)
static ContextCallback GetInvokeActionCallback()
static TaskScheduler Default
static ? TaskScheduler InternalCurrent
static Task t_currentTask
static void ThrowAsync(Exception exception, SynchronizationContext targetContext)
static readonly TplEventSource Log
static Guid CreateGuidForTaskID(int taskID)
unsafe void AwaitTaskContinuationScheduled(int OriginatingTaskSchedulerID, int OriginatingTaskID, int ContinueWithTaskId)
static void UnsafeQueueUserWorkItemInternal(object callBack, bool preferLocal)
delegate void ContextCallback(object? state)