/// <summary> /// Sends a ReplacePartsByRangeNotification message to a customer. /// </summary> /// <param name="request">The request.</param> /// <param name="uri">The URI.</param> /// <param name="uid">The uid.</param> /// <param name="contentType">The content type.</param> /// <param name="data">The data.</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> /// <param name="includeOverlappingIntervals"><c>true</c> if overlapping intervals should be included; otherwise, <c>false</c>.</param> /// <param name="changeTime">The change time.</param> /// <returns>The message identifier.</returns> public long ReplacePartsByRangeNotification(IMessageHeader request, string uri, string uid, string contentType, byte[] data, object startIndex, object endIndex, string uom, string depthDatum, bool includeOverlappingIntervals, long changeTime) { var header = CreateMessageHeader(Protocols.GrowingObjectNotification, MessageTypes.GrowingObjectNotification.PartDeleteNotification, request.MessageId); var message = new ReplacePartsByRangeNotification { Uri = uri, Uid = uid, ContentType = contentType, Data = data, DeletedInterval = new IndexInterval { StartIndex = new IndexValue { Item = startIndex }, EndIndex = new IndexValue { Item = endIndex }, Uom = uom ?? string.Empty, DepthDatum = depthDatum ?? string.Empty }, IncludeOverlappingIntervals = includeOverlappingIntervals, ChangeTime = changeTime }; return(Session.SendMessage(header, message)); }
/// <summary> /// Handles the ReplacePartsByRangeNotification message from a store. /// </summary> /// <param name="header">The message header.</param> /// <param name="notification">The ReplacePartsByRangeNotification message.</param> protected virtual void HandleReplacePartsByRangeNotification(IMessageHeader header, ReplacePartsByRangeNotification notification) { Notify(OnReplacePartsByRangeNotification, header, notification); }