Example #1
0
        /// <summary>
        /// Puts a data array slice in the data store.
        /// </summary>
        /// <param name="uri">The URI.</param>
        /// <param name="data">The data array.</param>
        /// <param name="dimensions">The dimensions.</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 <PutDataArraySlice> PutDataArraySlice(string uri, AnyArray data, IList <long> dimensions, IList <long> start, IList <long> count)
        {
            var body = new PutDataArraySlice
            {
                Uri        = uri ?? string.Empty,
                Data       = data,
                Dimensions = dimensions ?? new List <long>(),
                Start      = start ?? new List <long>(),
                Count      = count ?? new List <long>(),
            };

            return(SendRequest(body));
        }
        /// <summary>
        /// Puts a data array slice in the data store.
        /// </summary>
        /// <param name="uri">The URI.</param>
        /// <param name="data">The data array.</param>
        /// <param name="dimensions">The dimensions.</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 PutDataArraySlice(string uri, AnyArray data, IList <long> dimensions, IList <long> start, IList <long> count)
        {
            var header = CreateMessageHeader(Protocols.DataArray, MessageTypes.DataArray.PutDataArraySlice);

            var message = new PutDataArraySlice
            {
                Uri        = uri,
                Data       = data,
                Dimensions = dimensions,
                Start      = start,
                Count      = count
            };

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