/// <summary> /// Schedule a delayed callback with no parameters /// </summary> /// <param name="simpleDelayedCallbackMethod"></param> /// <param name="waitingMilliSeconds"></param> public static void Schedule( SimpleDelegate simpleDelayedCallbackMethod, int waitingMilliSeconds = 100) { DelayedCallback dcb = new DelayedCallback(); dcb.DelayedCallbackMethod = simpleDelayedCallbackMethod; dcb.RequestStack = new StackTrace(true); dcb.Schedule(waitingMilliSeconds); return; }
/// <summary> /// Schedule a delayed callback that includes a parameter object /// </summary> /// <param name="delayedCallbackMethod"></param> /// <param name="parms"></param> /// <param name="waitingMilliSeconds"></param> public static void Schedule( ObjectParmDelegate delayedCallbackMethod, object parms = null, int waitingMilliSeconds = 100) { DelayedCallback dcb = new DelayedCallback(); dcb.DelayedCallbackMethodWithParms = delayedCallbackMethod; dcb.Parms = parms; dcb.RequestStack = new StackTrace(true); dcb.Schedule(waitingMilliSeconds); return; }