/// <summary> /// 恢复当前续延 /// </summary> /// <param name="cont">要恢复的续延</param> /// <param name="result">续延的返回值</param> private void ResumeWithContinuation(Continuation cont, object result) { _callingStack = cont.GetCallingStack(); ResumeWithResult(result); }
/// <summary> /// 在当前的虚拟机上运行 Continuation /// </summary> /// <param name="continuation"></param> /// <param name="input"></param> /// <returns></returns> public object RunWithContinuation(Continuation continuation, object input) { ResumeWithContinuation(continuation, input); StartStepping(); return(((StackFrameResult)_callingStack.Pop()).Result); }