internal Executer(TransferAsyncResult asyncResult, BaseCommand command)
 {
     this._asyncResult = asyncResult;
     this._command = command;
 }
Ejemplo n.º 2
0
        IAsyncResult beginOperation(BaseCommand command, AsyncCallback callback, object state)
        {
            TransferAsyncResult result = new TransferAsyncResult(callback, state);

            Executer exe = new Executer(result, command);
            Thread thread = new Thread(new ThreadStart(exe.Execute));
            thread.Start();

            return result;
        }
        static 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;
        }