public Task <DataServiceResponse> SaveChangesWithRetriesAsync(SaveChangesOptions options, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginSaveChangesWithRetries, this.EndSaveChangesWithRetries, options, cancellationToken));
 }
示例#2
0
 public Task SetServicePropertiesAsync(ServiceProperties properties, QueueRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromVoidApm(this.BeginSetServiceProperties, this.EndSetServiceProperties, properties, options, operationContext, cancellationToken));
 }
示例#3
0
 public Task <ServiceStats> GetServiceStatsAsync(QueueRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginGetServiceStats, this.EndGetServiceStats, requestOptions, operationContext, cancellationToken));
 }
示例#4
0
 public virtual Task <ServiceProperties> GetServicePropertiesAsync(TableRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginGetServiceProperties, this.EndGetServiceProperties, requestOptions, operationContext, cancellationToken));
 }
示例#5
0
 public Task <QueueResultSegment> ListQueuesSegmentedAsync(string prefix, QueueListingDetails queueListingDetails, int?maxResults, QueueContinuationToken currentToken, QueueRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginListQueuesSegmented, this.EndListQueuesSegmented, prefix, queueListingDetails, maxResults, currentToken, options, operationContext, cancellationToken));
 }
示例#6
0
 public virtual Task <BlobResultSegment> ListBlobsSegmentedAsync(bool useFlatBlobListing, BlobListingDetails blobListingDetails, int?maxResults, BlobContinuationToken currentToken, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginListBlobsSegmented, this.EndListBlobsSegmented, useFlatBlobListing, blobListingDetails, maxResults, currentToken, options, operationContext, cancellationToken));
 }
示例#7
0
 public virtual Task <TableResultSegment> ListTablesSegmentedAsync(string prefix, int?maxResults, TableContinuationToken currentToken, TableRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginListTablesSegmented, this.EndListTablesSegmented, prefix, maxResults, currentToken, requestOptions, operationContext, cancellationToken));
 }
 /// <inheritdoc/>
 public IEnumerable <TRoot> GetAll() => AsyncExtensions.RunSynchronously(() => Inner.GetAllAsync());
 /// <inheritdoc/>
 public TRoot GetById(TIdentity id) => AsyncExtensions.RunSynchronously(() => Inner.GetByIdAsync(id));
示例#10
0
 public virtual Task <TableQuerySegment <TElement> > ExecuteSegmentedAsync(TableContinuationToken currentToken, TableRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginExecuteSegmented, this.EndExecuteSegmented, currentToken, requestOptions, operationContext, cancellationToken));
 }
 /// <inheritdoc/>
 public long GetCount() => AsyncExtensions.RunSynchronously(() => Inner.GetCountAsync());
示例#12
0
 public virtual Task <TableQuerySegment <TElement> > ExecuteSegmentedAsync(TableContinuationToken currentToken, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginExecuteSegmented, this.EndExecuteSegmented, currentToken, cancellationToken));
 }
 public Task <BlobResultSegment> ListBlobsSegmentedAsync(BlobContinuationToken currentToken, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginListBlobsSegmented, this.EndListBlobsSegmented, currentToken, cancellationToken));
 }
 public Task <DataServiceResponse> SaveChangesWithRetriesAsync(SaveChangesOptions options, TableRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginSaveChangesWithRetries, this.EndSaveChangesWithRetries, options, requestOptions, operationContext, cancellationToken));
 }
示例#15
0
 /// <inheritdoc/>
 public bool TryRemove(TRoot item) => AsyncExtensions.RunSynchronously(() => Inner.TryRemoveAsync(item));
 /// <inheritdoc/>
 public bool TryGetById(TIdentity id, out TRoot result)
 {
     result = AsyncExtensions.RunSynchronously(() => Inner.TryGetByIdAsync(id));
     return(!Equals(result, default(TRoot)));
 }
示例#17
0
 /// <inheritdoc/>
 public bool TryRemove(TIdentity id) => AsyncExtensions.RunSynchronously(() => Inner.TryRemoveAsync(id));
示例#18
0
 public virtual Task <ShareResultSegment> ListSharesSegmentedAsync(string prefix, FileContinuationToken currentToken, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginListSharesSegmented, this.EndListSharesSegmented, prefix, currentToken, cancellationToken));
 }
示例#19
0
 public virtual Task <TableResultSegment> ListTablesSegmentedAsync(TableContinuationToken currentToken, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginListTablesSegmented, this.EndListTablesSegmented, currentToken, cancellationToken));
 }
示例#20
0
 public virtual Task <ShareResultSegment> ListSharesSegmentedAsync(string prefix, ShareListingDetails detailsIncluded, int?maxResults, FileContinuationToken currentToken, FileRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginListSharesSegmented, this.EndListSharesSegmented, prefix, detailsIncluded, maxResults, currentToken, options, operationContext, cancellationToken));
 }
示例#21
0
 public virtual Task <ServiceProperties> GetServicePropertiesAsync(CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginGetServiceProperties, this.EndGetServiceProperties, cancellationToken));
 }
示例#22
0
 /// <inheritdoc/>
 public void Add(TRoot item) => AsyncExtensions.RunSynchronously(() => Inner.AddAsync(item));
示例#23
0
 public Task <QueueResultSegment> ListQueuesSegmentedAsync(string prefix, QueueContinuationToken currentToken, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginListQueuesSegmented, this.EndListQueuesSegmented, prefix, currentToken, cancellationToken));
 }
示例#24
0
 /// <inheritdoc/>
 public void Update(TRoot item) => AsyncExtensions.RunSynchronously(() => Inner.UpdateAsync(item));
示例#25
0
 public Task SetServicePropertiesAsync(ServiceProperties properties, CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromVoidApm(this.BeginSetServiceProperties, this.EndSetServiceProperties, properties, cancellationToken));
 }
示例#26
0
 /// <inheritdoc/>
 public void Remove(TRoot item) => AsyncExtensions.RunSynchronously(() => Inner.RemoveAsync(item));
示例#27
0
 public Task <ServiceStats> GetServiceStatsAsync(CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromApm(this.BeginGetServiceStats, this.EndGetServiceStats, cancellationToken));
 }
示例#28
0
 /// <inheritdoc/>
 public void Remove(TIdentity id) => AsyncExtensions.RunSynchronously(() => Inner.RemoveAsync(id));
 /// <summary>
 /// Returns a task that performs an asynchronous flush operation.
 /// </summary>
 /// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe while waiting for a task to complete.</param>
 /// <returns>A <see cref="Task"/> object that represents the current operation.</returns>
 public override Task FlushAsync(CancellationToken cancellationToken)
 {
     return(AsyncExtensions.TaskFromVoidApm(this.BeginFlush, this.EndFlush, cancellationToken));
 }
示例#30
0
 /// <summary>
 /// Computes the average of a sequence that is obtained by
 /// invoking a projection function on each element of the input sequence
 /// </summary>
 /// <typeparam name="TSource">The type of the elements of source</typeparam>
 /// <param name="source">A sequence of values to calculate the average of</param>
 /// <param name="predicate">A projection function to apply to each element</param>
 /// <returns>
 /// A task that represents the asynchronous operation
 /// The task result contains the average of the sequence of values
 /// </returns>
 public static Task <double> AverageAsync <TSource>(this IQueryable <TSource> source,
                                                    Expression <Func <TSource, long> > predicate)
 {
     return(AsyncExtensions.AverageAsync(source, predicate));
 }