示例#1
0
        void RunDTP_End(IAsyncResult ar)
        {
            PutFile_SO stateObj = (PutFile_SO)ar.AsyncState;

            try
            {
                stateObj.UpdateContext();
                _currentDTP.EndExecute(ar);
            }
            catch (Exception e)
            {
                stateObj.Exception = e;
            }
            finally
            {
                _currentDTP.Dispose();
                _currentDTP = null;
                stateObj.SetCompleted();
            }
        }
示例#2
0
        void RunDTP_End(IAsyncResult ar)
        {
            GetFile_SO stateObj = (GetFile_SO)ar.AsyncState;

            try
            {
                stateObj.UpdateContext();
                _currentDTP.EndExecute(ar);
            }
            catch (Exception e)
            {
                stateObj.Exception = e;
            }
            catch
            {
                NSTrace.WriteLineError("Non-CLS exception at: " + Environment.StackTrace);
                throw;
            }
            stateObj.SetCompleted();
        }
示例#3
0
        void RunDTP_End(IAsyncResult ar)
        {
            PutFileUnique_SO stateObj = (PutFileUnique_SO)ar.AsyncState;

            try
            {
                stateObj.UpdateContext();
                _currentDTP.EndExecute(ar);
            }
            catch (Exception e)
            {
                stateObj.Exception = e;
            }
            finally
            {
                _currentDTP.Dispose();
                _currentDTP           = null;
                _cc.ResponseReceived -= new FtpControlConnection.ResponseReceivedEventHandler(CC_ResponseReceived);
                stateObj.SetCompleted();
            }
        }
示例#4
0
        void RunCmd_End(IAsyncResult ar)
        {
            List_SO stateObj = (List_SO)ar.AsyncState;

            try
            {
                stateObj.UpdateContext();
                _currentDTP.EndExecute(ar);
            }
            catch (Exception e)
            {
                stateObj.Exception = e;
            }
            finally
            {
                _currentDTP.DataTransfered -= new Cmd_RunDTP.DataTransferedEventHandler(List_OnDataTransfered);
                _currentDTP.Dispose();
                _currentDTP = null;
                _linesBuilder.NewLineEvent -= new LinesBuilder.NewLineEventHandler(List_OnNewLineEvent);
                stateObj.SetCompleted();
            }
        }