private void ExcuteCompleted(TResult result, PartAsynExcuteStatus excuteStatus, Exception excuteEx) { this.ReleaseResource(); var asynExcuteResult = new PartAsynExcuteResult <T, TResult>(this._asynWaitPara.Para, excuteStatus, result, excuteEx); this.OnRaiseCompleted(asynExcuteResult); }
private void OnRaiseCompleted(PartAsynExcuteResult <T, TResult> asynExcuteResult) { if (this._asynWaitPara.AsynWait.InvokeRequired) { this._asynWaitPara.AsynWait.Invoke(new Action(() => { this.OnRaiseCompleted(asynExcuteResult); })); } else { var endAction = this._asynWaitPara.Completed; if (endAction != null) { endAction(asynExcuteResult); } } }