public virtual ICancellableAsyncResult BeginSetServiceProperties(FileServiceProperties properties, FileRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state)
        {
            requestOptions   = FileRequestOptions.ApplyDefaults(requestOptions, this);
            operationContext = operationContext ?? new OperationContext();

            return(CancellableAsyncResultTaskWrapper.Create(token => this.SetServicePropertiesAsync(properties, requestOptions, operationContext), callback, state));
        }
Esempio n. 2
0
 public override ICancellableAsyncResult BeginCommit(AsyncCallback callback, object state)
 {
     return(CancellableAsyncResultTaskWrapper.Create(token => this.CommitAsync(), callback, state));
 }
Esempio n. 3
0
 public override ICancellableAsyncResult BeginFlush(AsyncCallback callback, object state)
 {
     return(CancellableAsyncResultTaskWrapper.Create(token => this.FlushAsync(CancellationToken.None), callback, state));
 }
Esempio n. 4
0
 /// <summary>
 /// Begins an asynchronous write operation.
 /// </summary>
 /// <param name="buffer">An array of bytes. This method copies count bytes from
 /// buffer to the current stream. </param>
 /// <param name="offset">The zero-based byte offset in buffer at which to begin
 /// copying bytes to the current stream.</param>
 /// <param name="count">The number of bytes to be written to the current stream.</param>
 /// <param name="callback">An optional asynchronous callback, to be called when the write is complete.</param>
 /// <param name="state">A user-provided object that distinguishes this particular asynchronous write request from other requests.</param>
 /// <returns>An <c>IAsyncResult</c> that represents the asynchronous write, which could still be pending.</returns>
 public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
 {
     return(CancellableAsyncResultTaskWrapper.Create(token => WriteAsync(buffer, offset, count, token), callback, state));
 }
        public virtual ICancellableAsyncResult BeginListSharesSegmented(string prefix, ShareListingDetails detailsIncluded, int?maxResults, FileContinuationToken currentToken, FileRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
        {
            FileRequestOptions modifiedOptions = FileRequestOptions.ApplyDefaults(options, this);

            return(CancellableAsyncResultTaskWrapper.Create(token => this.ListSharesSegmentedAsync(prefix, detailsIncluded, maxResults, currentToken, modifiedOptions, operationContext), callback, state));
        }
Esempio n. 6
0
 public virtual ICancellableAsyncResult BeginListBlobsSegmented(bool useFlatBlobListing, BlobListingDetails blobListingDetails, int?maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
 {
     return(CancellableAsyncResultTaskWrapper.Create(token => this.ListBlobsSegmentedAsync(useFlatBlobListing, blobListingDetails, maxResults, currentToken, options, operationContext, token), callback, state));
 }
 public virtual ICancellableAsyncResult BeginGetServiceStats(QueueRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
 {
     return(CancellableAsyncResultTaskWrapper.Create(token => this.GetServiceStatsAsync(options, operationContext, token), callback, state));
 }
 /// <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 virtual ICancellableAsyncResult BeginListQueuesSegmented(string prefix, QueueListingDetails queueListingDetails, int?maxResults, QueueContinuationToken currentToken, QueueRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
 {
     return(CancellableAsyncResultTaskWrapper.Create(token => this.ListQueuesSegmentedAsync(prefix, queueListingDetails, maxResults, currentToken, options, operationContext, token), callback, state));
 }