ConfigurationHelper.GetCredentials 方法

Creates a new credentials object of the specified type using the registered cloud credentials providers and settings.

命名空间: Microsoft.WindowsAzure.Common.Internals
程序集: Microsoft.WindowsAzure.Common(在 Microsoft.WindowsAzure.Common.dll 中)

使用

用法
Dim settings As IDictionary(Of String, Object)
Dim isRequired As Boolean
Dim returnValue As T

returnValue = ConfigurationHelper.GetCredentials(settings, isRequired)

语法

声明
Public Shared Function GetCredentials(Of T As CloudCredentials) ( _
    settings As IDictionary(Of String, Object), _
    <OptionalAttribute> Optional isRequired As Boolean = True _
) As T
public static T GetCredentials<T> (
    IDictionary<string,Object> settings,
    [OptionalAttribute] bool isRequired
) where T : CloudCredentials
public:
generic<typename T> where T : CloudCredentials
static T GetCredentials (
    IDictionary<String^, Object^>^ settings, 
    [OptionalAttribute] bool isRequired
)

GenericParameters

  • T
    The type of cloud credentials.

参数

  • settings
    The collection of configuration settings.
  • isRequired
    The indicator of whether to require the credentials to be found. The value is true if the credentials must be found; otherwise, false.

返回值

An object that represents the first provider that supports the provided settings.

线程安全

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

平台

开发平台

Windows Vista、Windows 7 和 Windows Server 2008

目标平台

另请参阅

参考

ConfigurationHelper 类
ConfigurationHelper 成员
Microsoft.WindowsAzure.Common.Internals 命名空间