static IAsyncResult beginOperation(BaseCommand command, AsyncCallback callback, object state) { Executer exe = new Executer(callback, state, command); ThreadPool.QueueUserWorkItem(s => exe.Execute()); return(exe.AsyncResult); }
IAsyncResult beginOperation(BaseCommand command, AsyncCallback callback, object state) { TransferAsyncResult result = new TransferAsyncResult(callback, state); Executer exe = new Executer(result, command); ThreadPool.QueueUserWorkItem(s => exe.Execute()); return(result); }