Ejemplo n.º 1
0
        void Quit_End(IAsyncResult ar)
        {
            Disconnect_SO stateObj = (Disconnect_SO)ar.AsyncState;

            try
            {
                stateObj.UpdateContext();
                _cmdQuit.EndExecute(ar);
            }
            catch (Exception e)
            {
                stateObj.Exception = e;
            }
            stateObj.SetCompleted();
        }
Ejemplo n.º 2
0
        void Reset_End(IAsyncResult ar)
        {
            Disconnect_SO stateObj = (Disconnect_SO)ar.AsyncState;

            try
            {
                stateObj.UpdateContext();
                _cmdReset.EndExecute(ar);
                _cmdQuit.BeginExecute(stateObj.Timeout,
                                      new AsyncCallback(Quit_End),
                                      stateObj);
            }
            catch (Exception e)
            {
                stateObj.Exception = e;
                stateObj.SetCompleted();
            }
        }