/// <summary>
        /// Completes the asyncresult.
        /// </summary>
        /// <param name="asyncResults">The async results.</param>
        /// <param name="index">The index.</param>
        private static void CompleteAsyncresult(List <IAsyncResult> asyncResults, int index)
        {
            IAsyncResult signalledResult = asyncResults[index];

            // NO locking necessary as they happen on the singleton producer thread
            asyncResults.RemoveAt(index);
            TaskImplHelper.EndImpl(signalledResult);
        }
 /// <summary>
 /// Ends the asynchronous request with retry.
 /// </summary>
 /// <typeparam name="T">The result type of the task.</typeparam>
 /// <param name="asyncResult">The asynchronous result.</param>
 /// <returns>The result of the completed task.</returns>
 internal static T EndAsynchronousRequestWithRetry <T>(IAsyncResult asyncResult)
 {
     return(TaskImplHelper.EndImpl <T>(asyncResult));
 }
 public bool EndDeleteTableIfExist(IAsyncResult asyncResult)
 {
     return(TaskImplHelper.EndImpl <bool>(asyncResult));
 }
 public void EndDeleteTable(IAsyncResult asyncResult)
 {
     TaskImplHelper.EndImpl(asyncResult);
 }
 public bool EndCreateTableIfNotExist(IAsyncResult asyncResult)
 {
     return(TaskImplHelper.EndImpl <bool>(asyncResult));
 }
Пример #6
0
 public IEnumerable <PageRange> EndGetPageRanges(IAsyncResult asyncResult)
 {
     return(TaskImplHelper.EndImpl <IEnumerable <PageRange> >(asyncResult));
 }
Пример #7
0
 public void EndCreate(IAsyncResult asyncResult)
 {
     TaskImplHelper.EndImpl(asyncResult);
 }
Пример #8
0
 private void EndReadAhead(IAsyncResult asyncResult)
 {
     TaskImplHelper.EndImpl(asyncResult);
 }
Пример #9
0
 /// <summary>
 /// Ends an asynchronous read operation.
 /// </summary>
 /// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
 /// <returns>
 /// The number of bytes read from the stream, between zero (0) and the number of bytes you requested.
 /// Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is available.
 /// </returns>
 /// <exception cref="T:System.ArgumentNullException">
 /// <paramref name="asyncResult"/> is null.
 /// </exception>
 /// <exception cref="T:System.ArgumentException">
 /// <paramref name="asyncResult"/> did not originate from a <see cref="M:System.IO.Stream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)"/> method on the current stream.
 /// </exception>
 /// <exception cref="T:System.IO.IOException">
 /// The stream is closed or an internal error has occurred.
 /// </exception>
 public override int EndRead(IAsyncResult asyncResult)
 {
     return(TaskImplHelper.EndImpl <int>(asyncResult));
 }
 /// <summary>
 /// Ends an asynchronous operation to commit the blob.
 /// </summary>
 /// <param name="asyncResult">An <see cref="IAsyncResult"/> that references the pending asynchronous operation.</param>
 /// <exception cref="ArgumentNullException">asyncResult is null</exception>
 public override void EndCommit(IAsyncResult asyncResult)
 {
     TaskImplHelper.EndImpl(asyncResult);
 }
 /// <summary>B
 /// Ends an asynchronous write operation.
 /// </summary>
 /// <param name="asyncResult">An <see cref="IAsyncResult"/> that references the pending asynchronous operation.</param>
 /// <exception cref="ArgumentNullException">asyncResult is null</exception>
 public override void EndWrite(IAsyncResult asyncResult)
 {
     TaskImplHelper.EndImpl(asyncResult);
 }