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

            var message = new RealtimeData
            {
                Data = dataItems
            };

            return(Session.SendMessage(header, message));
        }
 /// <summary>
 /// Handles the RealtimeData message from a customer.
 /// </summary>
 /// <param name="header">The message header.</param>
 /// <param name="message">The RealtimeData message.</param>
 protected virtual void HandleRealtimeData(IMessageHeader header, RealtimeData message)
 {
     Notify(OnRealtimeData, header, message);
 }