public virtual ICancellableAsyncResult BeginSetServiceProperties(ServiceProperties properties, QueueRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state) { requestOptions = QueueRequestOptions.ApplyDefaults(requestOptions, this); operationContext = operationContext ?? new OperationContext(); return(CancellableAsyncResultTaskWrapper.Create(token => this.SetServicePropertiesAsync(properties, requestOptions, operationContext), callback, state)); }
/// <summary> /// Returns an enumerable collection of the queues in the storage account whose names begin with the specified prefix and that are retrieved lazily. /// </summary> /// <param name="prefix">The queue name prefix.</param> /// <param name="queueListingDetails">An enumeration value that indicates which details to include in the listing.</param> /// <param name="options">An object that specifies any additional options for the request.</param> /// <param name="operationContext">An <see cref="OperationContext"/> object that represents the context for the current operation. This object is used to track requests, and to provide additional runtime information about the operation.</param> /// <returns>An enumerable collection of objects that implement <see cref="CloudQueue"/> and are retrieved lazily.</returns> public IEnumerable <CloudQueue> ListQueues(string prefix, QueueListingDetails queueListingDetails = QueueListingDetails.None, QueueRequestOptions options = null, OperationContext operationContext = null) { QueueRequestOptions modifiedOptions = QueueRequestOptions.ApplyDefaults(options, this); operationContext = operationContext ?? new OperationContext(); return(General.LazyEnumerable((token) => this.ListQueuesSegmentedCore(prefix, queueListingDetails, 0, token as QueueContinuationToken, modifiedOptions, operationContext), long.MaxValue, operationContext)); }
public ServiceStats GetServiceStats(QueueRequestOptions requestOptions = null, OperationContext operationContext = null) { requestOptions = QueueRequestOptions.ApplyDefaults(requestOptions, this); operationContext = operationContext ?? new OperationContext(); return(Executor.ExecuteSync( this.GetServiceStatsImpl(requestOptions), requestOptions.RetryPolicy, operationContext)); }
/// <summary> /// Returns a result segment containing a collection of queues. /// </summary> /// <param name="prefix">A string containing the queue name prefix.</param> /// <param name="queueListingDetails">A <see cref="QueueListingDetails"/> enumeration describing which items to include in the listing.</param> /// <param name="maxResults">A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the /// per-operation limit of 5000. If this value is <c>null</c>, the maximum possible number of results will be returned, up to 5000.</param> /// <param name="currentToken">A <see cref="QueueContinuationToken"/> returned by a previous listing operation.</param> /// <param name="options">A <see cref="QueueRequestOptions"/> object that specifies additional options for the request. If <c>null</c>, default options are applied to the request.</param> /// <param name="operationContext">An <see cref="OperationContext"/> object that represents the context for the current operation.</param> /// <returns>A <see cref="QueueResultSegment"/> object.</returns> public QueueResultSegment ListQueuesSegmented(string prefix, QueueListingDetails queueListingDetails, int?maxResults, QueueContinuationToken currentToken, QueueRequestOptions options = null, OperationContext operationContext = null) { QueueRequestOptions modifiedOptions = QueueRequestOptions.ApplyDefaults(options, this); operationContext = operationContext ?? new OperationContext(); ResultSegment <CloudQueue> resultSegment = this.ListQueuesSegmentedCore(prefix, queueListingDetails, maxResults, currentToken, modifiedOptions, operationContext); return(new QueueResultSegment(resultSegment.Results, (QueueContinuationToken)resultSegment.ContinuationToken)); }
public virtual Task SetServicePropertiesAsync(ServiceProperties properties, QueueRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) { options = QueueRequestOptions.ApplyDefaults(options, this); operationContext = operationContext ?? new OperationContext(); return(Executor.ExecuteAsync( this.SetServicePropertiesImpl(properties, options), options.RetryPolicy, operationContext, cancellationToken)); }
public ICancellableAsyncResult BeginGetServiceStats(QueueRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state) { requestOptions = QueueRequestOptions.ApplyDefaults(requestOptions, this); operationContext = operationContext ?? new OperationContext(); return(Executor.BeginExecuteAsync( this.GetServiceStatsImpl(requestOptions), requestOptions.RetryPolicy, operationContext, callback, state)); }
public Task SetServicePropertiesAsync(ServiceProperties properties, QueueRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken) { QueueRequestOptions modifiedOptions = QueueRequestOptions.ApplyDefaults(requestOptions, this); operationContext = operationContext ?? new OperationContext(); return(Task.Run(async() => await Executor.ExecuteAsyncNullReturn( this.SetServicePropertiesImpl(properties, modifiedOptions), modifiedOptions.RetryPolicy, operationContext, cancellationToken), cancellationToken)); }
public IAsyncAction SetServicePropertiesAsync(ServiceProperties properties, QueueRequestOptions requestOptions, OperationContext operationContext) { QueueRequestOptions modifiedOptions = QueueRequestOptions.ApplyDefaults(requestOptions, this); operationContext = operationContext ?? new OperationContext(); return(AsyncInfo.Run(async(token) => await Executor.ExecuteAsyncNullReturn( this.SetServicePropertiesImpl(properties, modifiedOptions), modifiedOptions.RetryPolicy, operationContext, token))); }
public virtual ICancellableAsyncResult BeginSetServiceProperties(ServiceProperties properties, QueueRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state) { requestOptions = QueueRequestOptions.ApplyDefaults(requestOptions, this); operationContext = operationContext ?? new OperationContext(); return(Executor.BeginExecuteAsync( this.SetServicePropertiesImpl(properties, requestOptions), requestOptions.RetryPolicy, operationContext, callback, state)); }
public virtual Task <ServiceStats> GetServiceStatsAsync(QueueRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) { QueueRequestOptions modifiedOptions = QueueRequestOptions.ApplyDefaults(options, this); operationContext = operationContext ?? new OperationContext(); return(Executor.ExecuteAsync( this.GetServiceStatsImpl(modifiedOptions), modifiedOptions.RetryPolicy, operationContext, cancellationToken)); }
public IAsyncOperation <ServiceProperties> GetServicePropertiesAsync(QueueRequestOptions options, OperationContext operationContext) { QueueRequestOptions modifiedOptions = QueueRequestOptions.ApplyDefaults(options, this); operationContext = operationContext ?? new OperationContext(); return(AsyncInfo.Run(async(token) => await Executor.ExecuteAsync( this.GetServicePropertiesImpl(modifiedOptions), modifiedOptions.RetryPolicy, operationContext, token))); }
/// <summary> /// Begins an asynchronous operation to return a result segment containing a collection of queues. /// </summary> /// <param name="prefix">A string containing the queue name prefix.</param> /// <param name="queueListingDetails">A <see cref="QueueListingDetails"/> enumeration describing which items to include in the listing.</param> /// <param name="maxResults">A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the /// per-operation limit of 5000. If this value is <c>null</c>, the maximum possible number of results will be returned, up to 5000.</param> /// <param name="currentToken">A <see cref="QueueContinuationToken"/> returned by a previous listing operation.</param> /// <param name="options">A <see cref="QueueRequestOptions"/> object that specifies additional options for the request.</param> /// <param name="operationContext">An <see cref="OperationContext"/> object that represents the context for the current operation.</param> /// <param name="callback">An <see cref="AsyncCallback"/> delegate that will receive notification when the asynchronous operation completes.</param> /// <param name="state">A user-defined object that will be passed to the callback delegate.</param> /// <returns>An <see cref="ICancellableAsyncResult"/> that references the asynchronous operation.</returns> public ICancellableAsyncResult BeginListQueuesSegmented(string prefix, QueueListingDetails queueListingDetails, int?maxResults, QueueContinuationToken currentToken, QueueRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state) { QueueRequestOptions modifiedOptions = QueueRequestOptions.ApplyDefaults(options, this); operationContext = operationContext ?? new OperationContext(); return(Executor.BeginExecuteAsync( this.ListQueuesImpl(prefix, maxResults, queueListingDetails, modifiedOptions, currentToken), modifiedOptions.RetryPolicy, operationContext, callback, state)); }
public virtual async Task <QueueResultSegment> ListQueuesSegmentedAsync(string prefix, QueueListingDetails detailsIncluded, int?maxResults, QueueContinuationToken currentToken, QueueRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken) { QueueRequestOptions modifiedOptions = QueueRequestOptions.ApplyDefaults(options, this); operationContext = operationContext ?? new OperationContext(); ResultSegment <CloudQueue> resultSegment = await Executor.ExecuteAsync( this.ListQueuesImpl(prefix, maxResults, detailsIncluded, modifiedOptions, currentToken), modifiedOptions.RetryPolicy, operationContext, cancellationToken).ConfigureAwait(false); return(new QueueResultSegment(resultSegment.Results, (QueueContinuationToken)resultSegment.ContinuationToken)); }
public IAsyncOperation <QueueResultSegment> ListQueuesSegmentedAsync(string prefix, QueueListingDetails detailsIncluded, int?maxResults, QueueContinuationToken currentToken, QueueRequestOptions options, OperationContext operationContext) { QueueRequestOptions modifiedOptions = QueueRequestOptions.ApplyDefaults(options, this); operationContext = operationContext ?? new OperationContext(); return(AsyncInfo.Run(async(token) => { ResultSegment <CloudQueue> resultSegment = await Executor.ExecuteAsync( this.ListQueuesImpl(prefix, maxResults, detailsIncluded, modifiedOptions, currentToken), modifiedOptions.RetryPolicy, operationContext, token); return new QueueResultSegment(resultSegment.Results, (QueueContinuationToken)resultSegment.ContinuationToken); })); }
public void SetServiceProperties(ServiceProperties properties, QueueRequestOptions requestOptions = null, OperationContext operationContext = null) { requestOptions = QueueRequestOptions.ApplyDefaults(requestOptions, this); operationContext = operationContext ?? new OperationContext(); Executor.ExecuteSync(this.SetServicePropertiesImpl(properties, requestOptions), requestOptions.RetryPolicy, operationContext); }