Exemplo n.º 1
0
        /// <summary>
        /// Gets the data array slice by URI, start and count.
        /// </summary>
        /// <param name="uri">The URI.</param>
        /// <param name="start">The start.</param>
        /// <param name="count">The count.</param>
        /// <returns>The sent message on success; <c>null</c> otherwise.</returns>
        /// <exception cref="System.NotImplementedException"></exception>
        public virtual EtpMessage <GetDataArraySlice> GetDataArraySlice(string uri, IList <long> start, IList <long> count)
        {
            var body = new GetDataArraySlice
            {
                Uri   = uri ?? string.Empty,
                Start = start ?? new List <long>(),
                Count = count ?? new List <long>(),
            };

            return(SendRequest(body));
        }
        /// <summary>
        /// Gets the data array slice by URI, start and count.
        /// </summary>
        /// <param name="uri">The URI.</param>
        /// <param name="start">The start.</param>
        /// <param name="count">The count.</param>
        /// <returns>The message identifier.</returns>
        /// <exception cref="System.NotImplementedException"></exception>
        public long GetDataArraySlice(string uri, IList <long> start, IList <long> count)
        {
            var header = CreateMessageHeader(Protocols.DataArray, MessageTypes.DataArray.GetDataArraySlice);

            var message = new GetDataArraySlice
            {
                Uri   = uri,
                Start = start,
                Count = count
            };

            return(Session.SendMessage(header, message));
        }
 /// <summary>
 /// Handles the GetDataArraySlice message from a store.
 /// </summary>
 /// <param name="header">The message header.</param>
 /// <param name="message">The GetDataArraySlice message.</param>
 protected virtual void HandleGetDataArraySlice(IMessageHeader header, GetDataArraySlice message)
 {
     Notify(OnGetDataArraySlice, header, message);
 }