/// <summary> /// Handles the RequestChannelData message from a customer. /// </summary> /// <param name="header">The message header.</param> /// <param name="requestChannelData">The RequestChannelData message.</param> protected virtual void HandleRequestChannelData(IMessageHeader header, RequestChannelData requestChannelData) { var args = Notify(OnRequestChannelData, header, requestChannelData, new ChannelMetadata()); HandleRequestChannelData(args); if (!args.Cancel) { ChannelMetadata(args.Context); } }
/// <summary> /// Sends a RequestChannelData message to a producer. /// </summary> /// <param name="uri">The URI.</param> /// <param name="requestedInterval">The requested interval.</param> /// <returns>The message identifier.</returns> public virtual long RequestChannelData(string uri, IndexInterval requestedInterval) { var header = CreateMessageHeader((int)Protocols.ChannelDataFrame, (int)MessageTypes.ChannelDataFrame.RequestChannelData); var requestChannelData = new RequestChannelData { Uri = uri, RequestedInterval = requestedInterval }; return(Session.SendMessage(header, requestChannelData)); }