Exemplo n.º 1
0
        /// <summary>
        /// Sends an ObjectDeleted message to a customer.
        /// </summary>
        /// <param name="requestUuid">The request UUID.</param>
        /// <param name="uri">The URI.</param>
        /// <param name="changeTime">The change time.</param>
        /// <param name="extension">The message header extension.</param>
        /// <returns>The sent message on success; <c>null</c> otherwise.</returns>
        public virtual EtpMessage <ObjectDeleted> ObjectDeleted(Guid requestUuid, string uri, DateTime changeTime, IMessageHeaderExtension extension = null)
        {
            var body = new ObjectDeleted
            {
                RequestUuid = requestUuid,
                Uri         = uri ?? string.Empty,
                ChangeTime  = changeTime,
            };

            return(SendNotification(body, extension: extension));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sends a ObjectDeleted message to a customer.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <param name="uri">The URI.</param>
        /// <param name="changeTime">The change time.</param>
        /// <returns>The message identifier.</returns>
        public long ObjectDeleted(IMessageHeader request, string uri, long changeTime)
        {
            var header = CreateMessageHeader(Protocols.StoreNotification, MessageTypes.StoreNotification.ObjectDeleted, request.MessageId);

            var notification = new ObjectDeleted
            {
                Uri        = uri,
                ChangeTime = changeTime
            };

            return(Session.SendMessage(header, notification));
        }
Exemplo n.º 3
0
 /// <summary>
 /// Handles the ObjectDeleted message from a store.
 /// </summary>
 /// <param name="header">The message header.</param>
 /// <param name="notification">The ObjectDeleted message.</param>
 protected virtual void HandleObjectDeleted(IMessageHeader header, ObjectDeleted notification)
 {
     Notify(OnObjectDeleted, header, notification);
 }