コード例 #1
0
        private void SubUsernamePassword_Write_End(IAsyncResult ar)
        {
            UsernamePassword_SO asyncState = (UsernamePassword_SO)ar.AsyncState;

            try
            {
                asyncState.UpdateContext();
                base.NStream.EndWrite(ar);
                this.BeginReadWhole(asyncState.Reply, 0, 2, new AsyncCallback(this.SubUsernamePassword_Read_End), asyncState);
            }
            catch (Exception exception)
            {
                asyncState.Exception = exception;
                asyncState.SetCompleted();
            }
        }
コード例 #2
0
        private void SubUsernamePassword_Read_End(IAsyncResult ar)
        {
            UsernamePassword_SO asyncState = (UsernamePassword_SO)ar.AsyncState;

            try
            {
                asyncState.UpdateContext();
                this.EndReadWhole(ar);
                this.Validate_UsernamePasswordReply(asyncState.Reply);
            }
            catch (Exception exception)
            {
                asyncState.Exception = exception;
            }
            asyncState.SetCompleted();
        }