Ejemplo n.º 1
0
        /// <summary>
        /// Execute the action specific to the Message implementation.
        /// </summary>
        public override void Run()
        {
            Channel channel0 = (Channel)Channel;

            Debug.Assert(channel0.Id == 0);

            if (IsFailure)
            {
                return;
            }

            // extract the new Channel configuration from the AcceptChannelRequest
            AcceptChannelRequest request = (AcceptChannelRequest)channel0.GetRequest(RequestId);

            Debug.Assert(request != null);

            Connection      connection = (Connection)channel0.Connection;
            int             id         = request.ChannelId;
            IMessageFactory factory    = request.MessageFactory;
            IReceiver       receiver   = request.Receiver;
            ISerializer     serializer = request.Serializer;
            IPrincipal      principal  = request.Principal;

            Result = connection.AcceptChannelResponse(id, factory, serializer, receiver, principal);
        }