public static void Schedule(Action <object> callback, object state, bool lowPriority) { if (PartialTrustHelpers.ShouldFlowSecurityContext || WaitCallbackActionItem.ShouldUseActivity || Fx.Trace.IsEnd2EndActivityTracingEnabled) { (new ActionItem.DefaultActionItem(callback, state, lowPriority)).Schedule(); return; } else { ActionItem.ScheduleCallback(callback, state, lowPriority); return; } }
private void ScheduleCallback(Action <object> callback) { ActionItem.ScheduleCallback(callback, this, this.lowPriority); }