Esempio n. 1
0
        /// <summary>
        /// Sends a OpenChannel message to a store.
        /// </summary>
        /// <param name="channels">The channels.</param>
        /// <returns>The message identifier.</returns>
        public virtual long OpenChannel(IList <ChannelMetadataRecord> channels)
        {
            var header = CreateMessageHeader(Protocols.ChannelDataLoad, MessageTypes.ChannelDataLoad.OpenChannel);

            var message = new OpenChannel
            {
                Channels = channels
            };

            return(Session.SendMessage(header, message));
        }
        /// <summary>
        /// Handles the OpenChannel message from a customer.
        /// </summary>
        /// <param name="header">The message header.</param>
        /// <param name="message">The OpenChannel message.</param>
        protected virtual void HandleOpenChannel(IMessageHeader header, OpenChannel message)
        {
            var args     = Notify(OnOpenChannel, header, message);
            var channels = new List <OpenChannelInfo>();
            var errors   = new List <ErrorInfo>();

            HandleOpenChannel(args, channels, errors);

            if (!args.Cancel)
            {
                OpenChannelResponse(header, channels, errors);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Handles the OpenChannel message from a customer.
 /// </summary>
 /// <param name="header">The message header.</param>
 /// <param name="message">The OpenChannel message.</param>
 protected virtual void HandleOpenChannel(IMessageHeader header, OpenChannel message)
 {
     Notify(OnOpenChannel, header, message);
 }