Exemple #1
0
        /// <summary>
        /// Deletes all list items in a range of index values. Range is inclusive of the limits.
        /// </summary>
        /// <param name="uri">The URI of the parent object.</param>
        /// <param name="startIndex">The start index.</param>
        /// <param name="endIndex">The end index.</param>
        /// <returns>The sent message on success; <c>null</c> otherwise.</returns>
        public virtual EtpMessage <GrowingObjectDeleteRange> GrowingObjectDeleteRange(string uri, object startIndex, object endIndex, string uom, string depthDatum)
        {
            var body = new GrowingObjectDeleteRange
            {
                Uri        = uri ?? string.Empty,
                StartIndex = new GrowingObjectIndex {
                    Item = startIndex
                },
                EndIndex = new GrowingObjectIndex {
                    Item = endIndex
                },
                Uom        = uom ?? string.Empty,
                DepthDatum = depthDatum ?? string.Empty,
            };

            return(SendRequest(body));
        }
Exemple #2
0
        /// <summary>
        /// Deletes all list items in a range of index values. Range is inclusive of the limits.
        /// </summary>
        /// <param name="uri">The URI of the parent object.</param>
        /// <param name="startIndex">The start index.</param>
        /// <param name="endIndex">The end index.</param>
        /// <param name="uom">The unit of measure.</param>
        /// <param name="depthDatum">The depth datum.</param>
        /// <returns>The message identifier.</returns>
        public long GrowingObjectDeleteRange(string uri, object startIndex, object endIndex, string uom, string depthDatum)
        {
            var header = CreateMessageHeader(Protocols.GrowingObject, MessageTypes.GrowingObject.GrowingObjectDeleteRange);

            var message = new GrowingObjectDeleteRange
            {
                Uri        = uri,
                StartIndex = new GrowingObjectIndex {
                    Item = startIndex
                },
                EndIndex = new GrowingObjectIndex {
                    Item = endIndex
                },
                //Uom = uom,
                //DepthDatum = depthDatum
            };

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