private void RunPrepare() { TransitionResults = new MethodAsyncReturn() { MethodName = this.ID }; waitHandle.Reset(); }
//private void RunWorkerAsync() //{ // lock (this) // { // //RunPrepare(); // if (_methodWrapper != null) // { // if (_spawnedThreadDel == null) // { // _spawnedThreadDel = new MethodInvoker(RunAction); // } // //_spawnedThreadDel.BeginInvoke(new AsyncCallback(Completed), null); // //Edit by Kasem for Faster Method Execute // _spawnedThreadDel.BeginInvoke(_completeCallBack, null); // } // } //} /// <summary> /// Prepare the class members for a Sync or Async call /// </summary> private void RunPrepare() { if (_methodWrapper != null) { methodResults = new MethodAsyncReturn() { MethodName = _methodWrapper.MethodName }; waitHandle.Reset(); _sw.Reset(); _sw.Start(); } }