diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobContainerClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobContainerClient.cs index 68d2e86ad0912..1016e31e994a0 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobContainerClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobContainerClient.cs @@ -201,52 +201,6 @@ internal BlobContainerClient(Uri containerUri, HttpPipeline pipeline) /// A new instance. public virtual BlobClient GetBlobClient(string blobName) => new BlobClient(this.Uri.AppendToPath(blobName), this._pipeline); - /// - /// The operation creates a new container - /// under the specified account. If the container with the same name - /// already exists, the operation fails. - /// - /// For more information, see . - /// - /// - /// Optionally specifies whether data in the container may be accessed - /// publicly and the level of access. - /// specifies full public read access for container and blob data. - /// Clients can enumerate blobs within the container via anonymous - /// request, but cannot enumerate containers within the storage - /// account. specifies public - /// read access for blobs. Blob data within this container can be - /// read via anonymous request, but container data is not available. - /// Clients cannot enumerate blobs within the container via anonymous - /// request. If this parameter is null, container data is private to - /// the account owner. - /// - /// - /// Optional custom metadata to set for this container. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A describing the newly - /// created container. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public virtual Response Create( - PublicAccessType? publicAccessType = default, - Metadata metadata = default, - CancellationToken cancellationToken = default) => - this.CreateAsync( - publicAccessType, - metadata, - false, // async - cancellationToken) - .EnsureCompleted(); - /// /// The operation creates a new container /// under the specified account. If the container with the same name @@ -1619,47 +1573,6 @@ public virtual Response DeleteBlob( accessConditions, cancellationToken); - /// - /// The operation marks the specified - /// blob or snapshot for deletion. The blob is later deleted during - /// garbage collection. - /// - /// Note that in order to delete a blob, you must delete all of its - /// snapshots. You can delete both at the same time using - /// . - /// - /// For more information, see . - /// - /// The name of the blob to delete. - /// - /// Specifies options for deleting blob snapshots. - /// - /// - /// Optional to add conditions on - /// deleting this blob. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A on successfully deleting. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public virtual Response DeleteBlob( - string blobName, - DeleteSnapshotsOption? deleteOptions = default, - BlobAccessConditions? accessConditions = default, - CancellationToken cancellationToken = default) => - this.GetBlobClient(blobName) - .Delete( - deleteOptions, - accessConditions, - cancellationToken); - /// /// The operation marks the specified /// blob or snapshot for deletion. The blob is later deleted during diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs index 0748e45655558..54689dc565032 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs @@ -231,55 +231,7 @@ public virtual IEnumerable> GetContainers( new GetContainersAsyncCollection(this, options, cancellationToken); /// - /// The operation returns a - /// single segment of containers in the storage account, starting - /// from the specified . Use an empty - /// to start enumeration from the beginning - /// and the if it's not - /// empty to make subsequent calls to - /// to continue enumerating the containers segment by segment. - /// Containers are ordered lexicographically by name. - /// - /// For more information, see . - /// - /// - /// An optional string value that identifies the segment of the list - /// of containers to be returned with the next listing operation. The - /// operation returns a non-empty - /// if the listing operation did not return all containers remaining - /// to be listed with the current segment. The NextMarker value can - /// be used as the value for the parameter - /// in a subsequent call to request the next segment of list items. - /// - /// - /// Specifies options for listing, filtering, and shaping the - /// containers. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A describing a - /// segment of the containers in the storage account. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public virtual Response ListContainersSegment( - string marker = default, - ContainersSegmentOptions? options = default, - CancellationToken cancellationToken = default) => - this.ListContainersSegmentAsync( - marker, - options, - false, // async - cancellationToken) - .EnsureCompleted(syncOverAsync: true); - - /// - /// The operation returns a + /// The operation returns a /// single segment of containers in the storage account, starting /// from the specified . Use an empty /// to start enumeration from the beginning diff --git a/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs b/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs index e1435a4832a7e..0535bf857f136 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/PageBlobClient.cs @@ -1445,14 +1445,14 @@ public virtual Response UpdateSequenceNumber( /// notifications that the operation should be cancelled. /// /// - /// A describing the updated + /// A describing the updated /// page blob. /// /// /// A will be thrown if /// a failure occurs. /// - public virtual Response UpdateSequenceNumber( + public virtual async Task> UpdateSequenceNumberAsync( SequenceNumberAction action, long? sequenceNumber = default, PageBlobAccessConditions? accessConditions = default, diff --git a/sdk/storage/Azure.Storage.Files/src/DirectoryClient.cs b/sdk/storage/Azure.Storage.Files/src/DirectoryClient.cs index 23a7cd02becc6..558288bf43b2d 100644 --- a/sdk/storage/Azure.Storage.Files/src/DirectoryClient.cs +++ b/sdk/storage/Azure.Storage.Files/src/DirectoryClient.cs @@ -234,36 +234,6 @@ public virtual Response Create( cancellationToken) .EnsureCompleted(); - /// - /// The operation creates a new directory - /// at the specified . - /// - /// For more information, see . - /// - /// - /// Optional custom metadata to set for this directory. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A describing the newly - /// created directory. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public virtual Response Create( - Metadata metadata = default, - CancellationToken cancellationToken = default) => - this.CreateAsync( - metadata, - false, // async - cancellationToken) - .EnsureCompleted(syncOverAsync: true); - /// /// The operation creates a new directory /// at the specified . diff --git a/sdk/storage/Azure.Storage.Files/src/FileServiceClient.cs b/sdk/storage/Azure.Storage.Files/src/FileServiceClient.cs index b6752bdde8c30..4d7d7b4bf06d9 100644 --- a/sdk/storage/Azure.Storage.Files/src/FileServiceClient.cs +++ b/sdk/storage/Azure.Storage.Files/src/FileServiceClient.cs @@ -207,60 +207,10 @@ public virtual IEnumerable> GetShares( new GetSharesAsyncCollection(this, options, cancellationToken); /// - /// The operation returns a - /// single segment of shares in the storage account, starting - /// from the specified . Use an empty - /// to start enumeration from the beginning - /// and the if it's not - /// empty to make subsequent calls to - /// to continue enumerating the shares segment by segment. - /// - /// For more information, . - /// - /// - /// An optional string value that identifies the segment of the list - /// of shares to be returned with the next listing operation. The - /// operation returns a non-empty - /// if the listing operation did not return all shares remaining - /// to be listed with the current segment. The NextMarker value can - /// be used as the value for the parameter - /// in a subsequent call to request the next segment of list items. - /// - /// - /// Specifies options for listing, filtering, and shaping the - /// shares. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A describing a - /// segment of the shares in the storage account. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public virtual Response ListSharesSegment( - string marker = default, - SharesSegmentOptions? options = default, - CancellationToken cancellationToken = default) => - this.ListSharesSegmentAsync( - marker, - options, - false, // async - cancellationToken) - .EnsureCompleted(syncOverAsync: true); - - /// - /// The operation returns a - /// single segment of shares in the storage account, starting - /// from the specified . Use an empty - /// to start enumeration from the beginning - /// and the if it's not - /// empty to make subsequent calls to - /// to continue enumerating the shares segment by segment. + /// The operation returns an async collection + /// of the shares in the storage account. Enumerating the shares may + /// make multiple requests to the service while fetching all the + /// values. /// /// For more information, . /// diff --git a/sdk/storage/Azure.Storage.Files/src/ShareClient.cs b/sdk/storage/Azure.Storage.Files/src/ShareClient.cs index 1d2e5b5cbe3df..f5d4466114509 100644 --- a/sdk/storage/Azure.Storage.Files/src/ShareClient.cs +++ b/sdk/storage/Azure.Storage.Files/src/ShareClient.cs @@ -251,51 +251,6 @@ public virtual Response Create( cancellationToken) .EnsureCompleted(); - /// - /// Create a object for the root of the - /// share. The new uses the same request - /// policy pipeline as the . - /// - /// A new instance. - public virtual DirectoryClient GetRootDirectoryClient() - => this.GetDirectoryClient(""); - - /// - /// The operation creates a new share - /// under the specified account. If a share with the same name - /// already exists, the operation fails. - /// - /// For more information, see . - /// - /// - /// Optional custom metadata to set for this share. - /// - /// - /// Optional. Maximum size of the share in bytes. If unspecified, use the service's default value. - /// - /// - /// Optional to propagate - /// notifications that the operation should be cancelled. - /// - /// - /// A describing the newly - /// created share. - /// - /// - /// A will be thrown if - /// a failure occurs. - /// - public virtual Response Create( - Metadata metadata = default, - int? quotaInBytes = default, - CancellationToken cancellationToken = default) => - this.CreateAsync( - metadata, - quotaInBytes, - false, // async - cancellationToken) - .EnsureCompleted(syncOverAsync: true); - /// /// The operation creates a new share /// under the specified account. If a share with the same name diff --git a/sdk/storage/Azure.Storage.Queues/src/QueueClient.cs b/sdk/storage/Azure.Storage.Queues/src/QueueClient.cs index 9518463289656..a63885bee5a52 100644 --- a/sdk/storage/Azure.Storage.Queues/src/QueueClient.cs +++ b/sdk/storage/Azure.Storage.Queues/src/QueueClient.cs @@ -1415,595 +1415,5 @@ private async Task> UpdateMessageAsync( } } } - - /// - /// Clear deletes all messages from a queue. - /// For more information, see . - /// - /// - /// . - /// - /// - /// - /// - public virtual async Task ClearMessagesAsync( - CancellationToken cancellationToken = default) - { - using (this._pipeline.BeginLoggingScope(nameof(QueueClient))) - { - this._pipeline.LogMethodEnter( - nameof(QueueClient), - message: $"Uri: {this._messagesUri}"); - try - { - return await QueueRestClient.Messages.ClearAsync( - this._pipeline, - this._messagesUri, - cancellationToken: cancellationToken) - .ConfigureAwait(false); - } - catch (Exception ex) - { - this._pipeline.LogException(ex); - throw; - } - finally - { - this._pipeline.LogMethodExit(nameof(QueueClient)); - } - } - } - - /// - /// Adds a new message to the back of a queue. The visibility timeout specifies how long the message should be invisible - /// to Dequeue and Peek operations. The message content must be a UTF-8 encoded string that is up to 64KB in size. - /// For more information, see . - /// - /// - /// Message text. - /// - /// - /// Visibility timeout. Optional with a default value of 0. Cannot be larger than 7 days. - /// - /// - /// Optional. Specifies the time-to-live interval for the message - /// - /// - /// Optional . - /// - /// - /// - /// - public virtual async Task> EnqueueMessageAsync( - string messageText, - TimeSpan? visibilityTimeout = default, - TimeSpan? timeToLive = default, - CancellationToken cancellationToken = default) - { - using (this._pipeline.BeginLoggingScope(nameof(QueueClient))) - { - this._pipeline.LogMethodEnter( - nameof(QueueClient), - message: - $"Uri: {this._messagesUri}\n" + - $"{nameof(visibilityTimeout)}: {visibilityTimeout}\n" + - $"{nameof(timeToLive)}: {timeToLive}"); - try - { - var messages = - await QueueRestClient.Messages.EnqueueAsync( - this._pipeline, - this._messagesUri, - message: new QueueMessage { MessageText = messageText }, - visibilitytimeout: (int?)visibilityTimeout?.TotalSeconds, - messageTimeToLive: (int?)timeToLive?.TotalSeconds, - async: async, - cancellationToken: cancellationToken) - .ConfigureAwait(false); - // The service returns a sequence of messages, but the - // sequence only ever has one value so we'll unwrap it - return new Response( - messages.GetRawResponse(), - messages.Value.FirstOrDefault()); - } - catch (Exception ex) - { - this._pipeline.LogException(ex); - throw; - } - finally - { - this.Pipeline.LogMethodExit(nameof(QueueClient)); - } - } - } - - /// - /// Retrieves one or more messages from the front of the queue. - /// For more information, see . - /// - /// - /// Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. - /// If fewer are visible, the visible messages are returned. By default, a single message is retrieved from the queue with this operation. - /// - /// - /// Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The default value is 30 seconds. - /// - /// - /// Optional - /// - /// - /// IEnumerable of . - /// - public virtual Response> DequeueMessages( - int? maxMessages = default, - TimeSpan? visibilityTimeout = default, - CancellationToken cancellationToken = default) => - this.DequeueMessagesAsync( - maxMessages, - visibilityTimeout, - false, // async - cancellationToken) - .EnsureCompleted(); - - /// - /// Retrieves one or more messages from the front of the queue. - /// For more information, see . - /// - /// - /// Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. - /// If fewer are visible, the visible messages are returned. By default, a single message is retrieved from the queue with this operation. - /// - /// - /// Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The default value is 30 seconds. - /// - /// - /// Optional - /// - /// - /// IEnumerable of . - /// - public virtual async Task>> DequeueMessagesAsync( - int? maxMessages = default, - TimeSpan? visibilityTimeout = default, - CancellationToken cancellationToken = default) => - await this.DequeueMessagesAsync( - maxMessages, - visibilityTimeout, - true, // async - cancellationToken) - .ConfigureAwait(false); - - /// - /// Retrieves one or more messages from the front of the queue. - /// For more information, see . - /// - /// - /// Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. - /// If fewer are visible, the visible messages are returned. By default, a single message is retrieved from the queue with this operation. - /// - /// - /// Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The default value is 30 seconds. - /// - /// - /// Whether to invoke the operation asynchronously. - /// - /// - /// Optional - /// - /// - /// IEnumerable of . - /// - private async Task>> DequeueMessagesAsync( - int? maxMessages, - TimeSpan? visibilityTimeout, - bool async, - CancellationToken cancellationToken) - { - using (this._pipeline.BeginLoggingScope(nameof(QueueClient))) - { - this._pipeline.LogMethodEnter( - nameof(QueueClient), - message: - $"Uri: {this._messagesUri}\n" + - $"{nameof(maxMessages)}: {maxMessages}\n" + - $"{nameof(visibilityTimeout)}: {visibilityTimeout}"); - try - { - return await QueueRestClient.Messages.DequeueAsync( - this._pipeline, - this._messagesUri, - numberOfMessages: maxMessages, - visibilitytimeout: (int?)visibilityTimeout?.TotalSeconds, - async: async, - cancellationToken: cancellationToken) - .ConfigureAwait(false); - } - catch (Exception ex) - { - this._pipeline.LogException(ex); - throw; - } - finally - { - this._pipeline.LogMethodExit(nameof(QueueClient)); - } - } - } - - /// - /// Retrieves one or more messages from the front of the queue but does not alter the visibility of the message. - /// For more information, see . - /// - /// - /// Optional. A nonzero integer value that specifies the number of messages to peek from the queue, up to a maximum of 32. - /// By default, a single message is peeked from the queue with this operation. - /// - /// - /// Optional - /// - /// - /// IEnumerable of . - /// - public virtual Response> PeekMessages( - int? maxMessages = default, - CancellationToken cancellationToken = default) => - this.PeekMessagesAsync( - maxMessages, - false, // async - cancellationToken) - .EnsureCompleted(); - - /// - /// Retrieves one or more messages from the front of the queue but does not alter the visibility of the message. - /// For more information, see . - /// - /// - /// Optional. A nonzero integer value that specifies the number of messages to peek from the queue, up to a maximum of 32. - /// By default, a single message is peeked from the queue with this operation. - /// - /// - /// Optional - /// - /// - /// IEnumerable of . - /// - public virtual async Task>> PeekMessagesAsync( - int? maxMessages = default, - CancellationToken cancellationToken = default) => - await this.PeekMessagesAsync( - maxMessages, - true, // async - cancellationToken) - .ConfigureAwait(false); - - /// - /// Retrieves one or more messages from the front of the queue but does not alter the visibility of the message. - /// For more information, see . - /// - /// - /// Optional. A nonzero integer value that specifies the number of messages to peek from the queue, up to a maximum of 32. - /// By default, a single message is peeked from the queue with this operation. - /// - /// - /// Whether to invoke the operation asynchronously. - /// - /// - /// Optional - /// - /// - /// IEnumerable of . - /// - private async Task>> PeekMessagesAsync( - int? maxMessages, - bool async, - CancellationToken cancellationToken) - { - using (this._pipeline.BeginLoggingScope(nameof(QueueClient))) - { - this._pipeline.LogMethodEnter( - nameof(QueueClient), - message: - $"Uri: {this._messagesUri}\n" + - $"{nameof(maxMessages)}: {maxMessages}"); - try - { - return await QueueRestClient.Messages.PeekAsync( - this._pipeline, - this._messagesUri, - numberOfMessages: maxMessages, - async: async, - cancellationToken: cancellationToken) - .ConfigureAwait(false); - } - catch (Exception ex) - { - this._pipeline.LogException(ex); - throw; - } - finally - { - this._pipeline.LogMethodExit(nameof(QueueClient)); - } - } - } - - /// - /// Get the URI to a specific message given its ID. - /// - /// ID of the message. - /// URI to the given message. - private Uri GetMessageUri(string messageId) => - this._messagesUri.AppendToPath(messageId.ToString(CultureInfo.InvariantCulture)); - - /// - /// Permanently removes the specified message from its queue. - /// For more information, see . - /// - /// ID of the message to delete. - /// - /// Required. A valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. - /// - /// - /// Optional . - /// - /// - /// . - /// - public virtual Response DeleteMessage( - string messageId, - string popReceipt, - CancellationToken cancellationToken = default) => - this.DeleteMessageAsync( - messageId, - popReceipt, - false, // async - cancellationToken) - .EnsureCompleted(); - - /// - /// Permanently removes the specified message from its queue. - /// For more information, see . - /// - /// ID of the message to delete. - /// - /// Required. A valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. - /// - /// - /// Optional . - /// - /// - /// . - /// - public virtual async Task DeleteMessageAsync( - string messageId, - string popReceipt, - CancellationToken cancellationToken = default) => - await this.DeleteMessageAsync( - messageId, - popReceipt, - true, // async - cancellationToken) - .ConfigureAwait(false); - - /// - /// Permanently removes the specified message from its queue. - /// For more information, see . - /// - /// ID of the message to delete. - /// - /// Required. A valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. - /// - /// - /// Whether to invoke the operation asynchronously. - /// - /// - /// Optional . - /// - /// - /// . - /// - private async Task DeleteMessageAsync( - string messageId, - string popReceipt, - bool async, - CancellationToken cancellationToken) - { - var uri = this.GetMessageUri(messageId); - using (this._pipeline.BeginLoggingScope(nameof(QueueClient))) - { - this._pipeline.LogMethodEnter( - nameof(QueueClient), - message: - $"Uri: {uri}\n" + - $"{nameof(popReceipt)}: {popReceipt}"); - try - { - return await QueueRestClient.MessageId.DeleteAsync( - this._pipeline, - uri, - popReceipt: popReceipt, - async: async, - cancellationToken: cancellationToken) - .ConfigureAwait(false); - } - catch (Exception ex) - { - this._pipeline.LogException(ex); - throw; - } - finally - { - this._pipeline.LogMethodExit(nameof(QueueClient)); - } - } - } - - /// - /// Changes a message's visibility timeout and contents. The message content must be a UTF-8 encoded string that is up to 64KB in size. - /// For more information, see . - /// - /// - /// Updated message text. - /// - /// ID of the message to update. - /// - /// Required. Specifies the valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. - /// - /// - /// Required. Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than - /// or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the - /// expiry time. A message can be updated until it has been deleted or has expired. - /// - /// - /// Optional . - /// - /// - /// . - /// - public virtual Response UpdateMessage( - string messageText, - string messageId, - string popReceipt, - TimeSpan visibilityTimeout = default, - CancellationToken cancellationToken = default) => - this.UpdateMessageAsync( - messageText, - messageId, - popReceipt, - visibilityTimeout, - false, // async - cancellationToken) - .EnsureCompleted(); - - /// - /// Changes a message's visibility timeout and contents. The message content must be a UTF-8 encoded string that is up to 64KB in size. - /// For more information, see . - /// - /// - /// Updated message text. - /// - /// ID of the message to update. - /// - /// Required. Specifies the valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. - /// - /// - /// Required. Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than - /// or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the - /// expiry time. A message can be updated until it has been deleted or has expired. - /// - /// - /// Optional . - /// - /// - /// . - /// - public virtual async Task> UpdateMessageAsync( - string messageText, - string messageId, - string popReceipt, - TimeSpan visibilityTimeout = default, - CancellationToken cancellationToken = default) => - await this.UpdateMessageAsync( - messageText, - messageId, - popReceipt, - visibilityTimeout, - true, // async - cancellationToken) - .ConfigureAwait(false); - - /// - /// Changes a message's visibility timeout and contents. The message content must be a UTF-8 encoded string that is up to 64KB in size. - /// For more information, see . - /// - /// - /// Updated message text. - /// - /// ID of the message to update. - /// - /// Required. Specifies the valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation. - /// - /// - /// Required. Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than - /// or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the - /// expiry time. A message can be updated until it has been deleted or has expired. - /// - /// - /// Whether to invoke the operation asynchronously. - /// - /// - /// Optional . - /// - /// - /// . - /// - private async Task> UpdateMessageAsync( - string messageText, - string messageId, - string popReceipt, - TimeSpan visibilityTimeout, - bool async, - CancellationToken cancellationToken) - { - var uri = this.GetMessageUri(messageId); - using (this._pipeline.BeginLoggingScope(nameof(QueueClient))) - { - this._pipeline.LogMethodEnter( - nameof(QueueClient), - message: - $"Uri: {uri}\n" + - $"{nameof(popReceipt)}: {popReceipt}" + - $"{nameof(visibilityTimeout)}: {visibilityTimeout}"); - try - { - return await QueueRestClient.MessageId.UpdateAsync( - this._pipeline, - uri, - message: new QueueMessage { MessageText = messageText }, - popReceipt: popReceipt, - visibilitytimeout: (int)visibilityTimeout.TotalSeconds, - async: async, - cancellationToken: cancellationToken) - .ConfigureAwait(false); - } - catch (Exception ex) - { - this._pipeline.LogException(ex); - throw; - } - finally - { - this._pipeline.LogMethodExit(nameof(QueueClient)); - } - } - } - } -} - -namespace Azure.Storage.Queues.Models -{ - /// - /// The object returned in the QueueMessageList array when calling Get - /// Messages on a Queue. - /// - public partial class DequeuedMessage - { - /// - /// Update a after calling - /// with the resulting - /// - /// - /// The message details. - /// The updated . - public DequeuedMessage Update(UpdatedMessage updated) => - QueueModelFactory.DequeuedMessage( - this.MessageId, - this.InsertionTime, - this.ExpirationTime, - updated.PopReceipt, - updated.TimeNextVisible, - this.DequeueCount, - this.MessageText); } } diff --git a/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs b/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs index d89e759958a3f..f99c57401c814 100644 --- a/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs +++ b/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs @@ -237,40 +237,8 @@ public virtual IEnumerable> GetQueues( /// Use an empty marker to start enumeration from the beginning. Queue names are returned in lexicographic order. /// After getting a segment, process it, and then call ListQueuesSegment again (passing in the next marker) to get the next segment. /// - public virtual Response ListQueuesSegment( - QueuesSegmentOptions? options = default, - string marker = default, - CancellationToken cancellationToken = default) => - this.ListQueuesSegmentAsync( - options, - marker, - false, // async - cancellationToken) - .EnsureCompleted(syncOverAsync: true); - - /// - /// Returns a single segment of containers starting from the specified marker. - /// For more information, see - /// - /// - /// - /// - /// - /// Marker from the previous request. - /// - /// - /// - /// - /// - /// A single segment of containers starting from the specified marker, including the next marker if appropriate. - /// - /// - /// Use an empty marker to start enumeration from the beginning. Queue names are returned in lexicographic order. - /// After getting a segment, process it, and then call ListQueuesSegmentAsync again (passing in the next marker) to get the next segment. - /// - public virtual async Task> ListQueuesSegmentAsync( - QueuesSegmentOptions? options = default, - string marker = default, + public virtual AsyncCollection GetQueuesAsync( + GetQueuesOptions? options = default, CancellationToken cancellationToken = default) => new GetQueuesAsyncCollection(this, options, cancellationToken);