Esempio n. 1
0
 public GetQueuesAsyncCollection(
     QueueServiceClient client,
     GetQueuesOptions?options)
 {
     _client  = client;
     _options = options;
 }
 public GetQueuesAsyncCollection(
     QueueServiceClient client,
     GetQueuesOptions?options,
     CancellationToken cancellationToken)
     : base(cancellationToken)
 {
     _client  = client;
     _options = options;
 }
 /// <summary>
 /// Returns a single segment of containers starting from the specified marker.
 /// For more information, see <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/list-queues1"/>
 /// </summary>
 /// <param name="options">
 /// <see cref="QueuesSegmentOptions"/>
 /// </param>
 /// <param name="marker">
 /// Marker from the previous request.
 /// </param>
 /// <param name="cancellationToken">
 /// <see cref="CancellationToken"/>
 /// </param>
 /// <returns>
 /// A single segment of containers starting from the specified marker, including the next marker if appropriate.
 /// </returns>
 /// <remarks>
 /// 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.
 /// </remarks>
 internal async Task <Response <QueuesSegment> > GetQueuesAsync(
     string marker,
     GetQueuesOptions?options,
     int?pageSizeHint,
     bool async,
     CancellationToken cancellationToken)
 {
     using (this.Pipeline.BeginLoggingScope(nameof(QueueServiceClient)))
     {
         this.Pipeline.LogMethodEnter(
             nameof(QueueServiceClient),
             message:
             $"{nameof(this.Uri)}: {this.Uri}\n" +
             $"{nameof(marker)}: {marker}\n" +
             $"{nameof(options)}: {options}");
         try
         {
             return(await QueueRestClient.Service.ListQueuesSegmentAsync(
                        this.Pipeline,
                        this.Uri,
                        marker : marker,
                        prefix : options?.Prefix,
                        maxresults : pageSizeHint,
                        include : options?.AsIncludeTypes(),
                        async : async,
                        cancellationToken : cancellationToken)
                    .ConfigureAwait(false));
         }
         catch (Exception ex)
         {
             this.Pipeline.LogException(ex);
             throw;
         }
         finally
         {
             this.Pipeline.LogMethodExit(nameof(QueueServiceClient));
         }
     }
 }
 /// <summary>
 /// The <see cref="GetQueuesAsync"/> operation returns an async
 /// collection of queues in the storage account.  Enumerating the
 /// queues may make multiple requests to the service while fetching
 /// all the values.  Queue names are returned in lexicographic order.
 ///
 /// For more information, see <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/list-queues1"/>
 /// </summary>
 /// <param name="options">
 /// <see cref="GetQueuesOptions"/>
 /// </param>
 /// <param name="cancellationToken">
 /// <see cref="CancellationToken"/>
 /// </param>
 /// <returns>
 /// The queues in the storage account.
 /// </returns>
 /// <remarks>
 /// 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.
 /// </remarks>
 public virtual AsyncCollection <QueueItem> GetQueuesAsync(
     GetQueuesOptions?options            = default,
     CancellationToken cancellationToken = default) =>
 new GetQueuesAsyncCollection(this, options, cancellationToken);
 /// <summary>
 /// The <see cref="GetQueues"/> operation returns an async
 /// sequence of queues in the storage account.  Enumerating the
 /// queues may make multiple requests to the service while fetching
 /// all the values.  Queue names are returned in lexicographic order.
 ///
 /// For more information, see <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/list-queues1"/>
 /// </summary>
 /// <param name="options">
 /// <see cref="GetQueuesOptions"/>
 /// </param>
 /// <param name="cancellationToken">
 /// <see cref="CancellationToken"/>
 /// </param>
 /// <returns>
 /// The queues in the storage account.
 /// </returns>
 public virtual IEnumerable <Response <QueueItem> > GetQueues(
     GetQueuesOptions?options            = default,
     CancellationToken cancellationToken = default) =>
 new GetQueuesAsyncCollection(this, options, cancellationToken);
Esempio n. 6
0
 /// <summary>
 /// The <see cref="GetQueues"/> operation returns an async
 /// sequence of queues in the storage account.  Enumerating the
 /// queues may make multiple requests to the service while fetching
 /// all the values.  Queue names are returned in lexicographic order.
 ///
 /// For more information, see <see href="https://docs.microsoft.com/en-us/rest/api/storageservices/list-queues1"/>
 /// </summary>
 /// <param name="options">
 /// <see cref="GetQueuesOptions"/>
 /// </param>
 /// <param name="cancellationToken">
 /// <see cref="CancellationToken"/>
 /// </param>
 /// <returns>
 /// The queues in the storage account.
 /// </returns>
 public virtual Pageable <QueueItem> GetQueues(
     GetQueuesOptions?options            = default,
     CancellationToken cancellationToken = default) =>
 new GetQueuesAsyncCollection(this, options).ToSyncCollection(cancellationToken);