销售电话: 1-800-867-1380

CloudTableClient.EndCreateTable 方法

Ends an asychronous operation to create a table.

命名空间: Microsoft.WindowsAzure.StorageClient
程序集: Microsoft.WindowsAzure.StorageClient(在 microsoft.windowsazure.storageclient.dll 中)

用法
Dim instance As CloudTableClient
Dim asyncResult As IAsyncResult

instance.EndCreateTable(asyncResult)

public void EndCreateTable (
	IAsyncResult asyncResult
)
public void EndCreateTable (
	IAsyncResult asyncResult
)
public function EndCreateTable (
	asyncResult : IAsyncResult
)

参数

asyncResult

An IAsyncResult that references the pending asynchronous operation.

The following code example creates a table asynchronously, and handles the error if the table already exists.

static void CreateTableAsync(CloudStorageAccount storageAccount)
{
    // Create service client for credentialed access to the Table service.
    CloudTableClient tableClient = new CloudTableClient(storageAccount.TableEndpoint.ToString(),
        storageAccount.Credentials);

    // Begin the operation to create a new table.
    tableClient.BeginCreateTable("Customers", CreateTableAsyncCallback, tableClient);
}

public static void CreateTableAsyncCallback(IAsyncResult result)
{
    CloudTableClient tableClient = (CloudTableClient)result.AsyncState;

    try
    {
        // End the operation.
        tableClient.EndCreateTable(result);
    }
    catch (StorageClientException e)
    {
        Console.WriteLine("Error: {0}", e.Message);
        Console.WriteLine("Extended error info: {0} : {1}", e.ExtendedErrorInformation.ErrorCode,
            e.ExtendedErrorInformation.ErrorMessage);
    } 
}

此类型的任何公共静态(在 Visual Basic 中为 Shared)成员都是线程安全的。但不保证所有实例成员都是线程安全的。

开发平台

Windows XP Home Edition, Windows XP Professional, Windows Server 2003、Windows Server 2008 和 Windows 2000

目标平台

本文是否对您有所帮助?
(1500 个剩余字符)
感谢您的反馈

社区附加资源

显示:
© 2014 Microsoft