/// <summary> /// Begins an asynchronous operation to create a table with the specified name if it does not already exist. /// </summary> /// <param name="tableName">The table name.</param> /// <param name="callback">The callback 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="IAsyncResult"/> that references the asynchronous operation.</returns> public IAsyncResult BeginCreateTableIfNotExist(string tableName, AsyncCallback callback, object state) { return(TaskImplHelper.BeginImpl <bool>( (setResult) => this.CreateTableIfNotExistImpl(tableName, setResult), callback, state)); }
/// <summary> /// Begins the asynchronous request with retry. /// </summary> /// <typeparam name="T">The result type of the task.</typeparam> /// <param name="oracle">The oracle to use.</param> /// <param name="impl">The task implementation.</param> /// <param name="callback">The asynchronous callback.</param> /// <param name="state">The asynchronous state.</param> /// <returns>An <see cref="IAsyncResult"/> that represents the asynchronous operation.</returns> internal static IAsyncResult BeginAsynchronousRequestWithRetry <T>( ShouldRetry oracle, Func <Action <T>, TaskSequence> impl, AsyncCallback callback, object state) { return(TaskImplHelper.BeginImpl <T>((setResult) => RequestWithRetryImpl <T>(oracle, impl, setResult), callback, state)); }
/// <summary> /// Begins an asynchronous operation to delete the tables if it exists. /// </summary> /// <param name="tableName">The table name.</param> /// <param name="callback">The callback 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="IAsyncResult"/> that references the asynchronous operation.</returns> public IAsyncResult BeginDeleteTableIfExist(string tableName, AsyncCallback callback, object state) { CommonUtils.CheckStringParameter(tableName, false, "tableName", Protocol.Constants.TableServiceMaxStringPropertySizeInChars); TableServiceUtilities.CheckTableName(tableName, "tableName"); return(TaskImplHelper.BeginImpl <bool>((setResult) => this.DeleteTableIfExistImpl(tableName, setResult), callback, state)); }
/// <summary> /// Begins an asynchronous read operation. /// </summary> /// <param name="buffer">The buffer to read the data into.</param> /// <param name="offset">The byte offset in <paramref name="buffer"/> at which to begin writing data read from the stream.</param> /// <param name="count">The maximum number of bytes to read.</param> /// <param name="callback">An optional asynchronous callback, to be called when the read is complete.</param> /// <param name="state">A user-provided object that distinguishes this particular asynchronous read request from other requests.</param> /// <returns> /// An <see cref="T:System.IAsyncResult"/> that represents the asynchronous read, which could still be pending. /// </returns> /// <exception cref="T:System.IO.IOException"> /// Attempted an asynchronous read past the end of the stream, or a disk error occurs. /// </exception> /// <exception cref="T:System.ArgumentException"> /// One or more of the arguments is invalid. /// </exception> /// <exception cref="T:System.ObjectDisposedException"> /// Methods were called after the stream was closed. /// </exception> /// <exception cref="T:System.NotSupportedException"> /// The current Stream implementation does not support the read operation. /// </exception> public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { return(TaskImplHelper.BeginImpl <int>((result) => this.ReadImplWrapper(buffer, offset, count, result), callback, state)); }
/// <summary> /// Begins an asynchronous operation to commit the blob. /// </summary> /// <param name="callback">An optional asynchronous callback, to be called when the commit is complete.</param> /// <param name="state">A user-provided object that distinguishes this particular asynchronous commit request from other requests.</param> /// <returns>An IAsyncResult that represents the asynchronous commit, which could still be pending.</returns> public override IAsyncResult BeginCommit(AsyncCallback callback, object state) { return(TaskImplHelper.BeginImpl(this.CommitImpl, callback, state)); }