你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AzureContextAdapterExtensions.GetCurrentStorageAccount Method

Definition

Get the current storage account.

public static Microsoft.WindowsAzure.Storage.CloudStorageAccount GetCurrentStorageAccount (this Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContext context, Microsoft.WindowsAzure.Commands.Common.Storage.IStorageServiceProvider provider);
static member GetCurrentStorageAccount : Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContext * Microsoft.WindowsAzure.Commands.Common.Storage.IStorageServiceProvider -> Microsoft.WindowsAzure.Storage.CloudStorageAccount
<Extension()>
Public Function GetCurrentStorageAccount (context As IAzureContext, provider As IStorageServiceProvider) As CloudStorageAccount

Parameters

context
IAzureContext

The current Azure context.

provider
IStorageServiceProvider

The storage service provider to retrieve storage service details

Returns

The current storage account, or null, if no current storage account is set.

Applies to