Exemplo n.º 1
0
 public Task DeleteMessage(QueueUri queueUri, QueueMessage queueMessage)
 {
     var queueMessageUri = new QueueMessageUri(queueUri, queueMessage, null);
     var result = _GetHttpClientAdapter(queueUri.Account).Delete(queueMessageUri);
     return result.ContinueWith(x =>
                                    {
                                        if (x.Result.StatusCode != HttpStatusCode.NoContent)
                                            throw new AzureStorageException("DeleteMessage", queueMessageUri, x.Result);
                                    });
 }
Exemplo n.º 2
0
 public QueueMessageUri(QueueUri queueUri, QueueMessage queueMessage, TimeSpan? visibilityTimeout)
 {
     _queueUri = queueUri;
     _queueMessage = queueMessage;
     _visibilityTimeout = visibilityTimeout;
 }
Exemplo n.º 3
0
 public Task<UpdateMessageResult> UpdateMessage(QueueUri queueUri, QueueMessage queueMessage, string newContent, TimeSpan newVisibilityTimeout)
 {
     var queueMessageUri = new QueueMessageUri(queueUri, queueMessage, newVisibilityTimeout);
     var messageContent = _queueSerialization.GetMessageContent(newContent);
     var result = _GetHttpClientAdapter(queueUri.Account).Put(queueMessageUri, messageContent);
     return result.ContinueWith(x =>
                             {
                                 if (x.Result.StatusCode != HttpStatusCode.NoContent)
                                     throw new AzureStorageException("UpdateMessage", queueMessageUri, x.Result);
                                 return _ParseUpdateMessageResultHeaders(x.Result);
                             });
 }