상속: ChannelMessage
예제 #1
0
        private void Channel_RequestReceived(object sender, ChannelRequestEventArgs e)
        {
            Message replyMessage;

            if (e.Info is ExitStatusRequestInfo)
            {
                var exitStatusInfo = e.Info as ExitStatusRequestInfo;

                this.ExitStatus = (int) exitStatusInfo.ExitStatus;

                replyMessage = new ChannelSuccessMessage(this._channel.LocalChannelNumber);
            }
            else
            {
                replyMessage = new ChannelFailureMessage(this._channel.LocalChannelNumber);
            }

            if (e.Info.WantReply)
            {
                this._session.SendMessage(replyMessage);
            }
        }
예제 #2
0
 public void ChannelFailureMessageConstructorTest()
 {
     ChannelFailureMessage target = new ChannelFailureMessage();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
예제 #3
0
 public void ChannelFailureMessageConstructorTest1()
 {
     uint localChannelNumber = 0; // TODO: Initialize to an appropriate value
     ChannelFailureMessage target = new ChannelFailureMessage(localChannelNumber);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
예제 #4
0
        private void Channel_RequestReceived(object sender, ChannelRequestEventArgs e)
        {
            var exitStatusInfo = e.Info as ExitStatusRequestInfo;
            if (exitStatusInfo != null)
            {
                ExitStatus = (int) exitStatusInfo.ExitStatus;

                if (exitStatusInfo.WantReply)
                {
                    var replyMessage = new ChannelSuccessMessage(_channel.LocalChannelNumber);
                    _session.SendMessage(replyMessage);
                }
            }
            else
            {
                if (e.Info.WantReply)
                {
                    var replyMessage = new ChannelFailureMessage(_channel.LocalChannelNumber);
                    _session.SendMessage(replyMessage);
                }
            }
        }