Share via


ConfigurationHelper.GetCredentials Method

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

Namespace: Microsoft.WindowsAzure.Common.Internals
Assembly: Microsoft.WindowsAzure.Common (in Microsoft.WindowsAzure.Common.dll)

Usage

'Usage
Dim settings As IDictionary(Of String, Object)
Dim isRequired As Boolean
Dim returnValue As T

returnValue = ConfigurationHelper.GetCredentials(settings, isRequired)

Syntax

'Declaration
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.

Parameters

  • 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.

Return Value

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

See Also

Reference

ConfigurationHelper Class
ConfigurationHelper Members
Microsoft.WindowsAzure.Common.Internals Namespace