Exemple #1
0
        public void DeleteMessage(AzureQueueMessage message)
        {
            if (!(message is T))
            {
                throw new ArgumentException("Message should be instance of T", "message");
            }

            DeleteMessage(message as T);
        }
Exemple #2
0
        public void UpdateMessage(AzureQueueMessage message)
        {
            if (!(message is T))
            {
                throw new ArgumentException("Message should be instance of T", "message");
            }

            var messageRef = message.MessageReference;

            if (messageRef == null)
            {
                throw new ArgumentException("Message reference cannot be null", "message");
            }

            messageRef.SetMessageContent(GetSerializedMessage(message as T));
            Queue.UpdateMessage(messageRef, MessageVisibilityTimeout, MessageUpdateFields.Visibility | MessageUpdateFields.Content);
        }