C# Class Microsoft.WindowsAzure.Commands.Utilities.Common.WindowsAzureProfile

This class is the entry point for all the persistent state related to azure connections, including current environment, subscriptions, etc.
Datei anzeigen Open project: AzureRT/azure-sdk-tools Class Usage Examples

Public Methods

Method Description
AddAccounts ( WindowsAzureEnvironment environment ) : string

Log in to the given environment, and download and add subscriptions for the given account in that environment.

AddEnvironment ( WindowsAzureEnvironment newEnvironment ) : void
AddSubscription ( WindowsAzureSubscription s ) : void
DestroyData ( ) : void

Destroy any saved data. Deletes the data store and removes any certificates from the certificate store.

ImportPublishSettings ( Stream stream ) : void
ImportPublishSettings ( string fileName ) : void
RemoveEnvironment ( string name ) : void
RemoveSubscription ( WindowsAzureSubscription s ) : void
ResetInstance ( ) : void

Reset the default instance, used when the instance has been replaced for testing.

UpdateEnvironment ( WindowsAzureEnvironment newEnvironment ) : void
UpdateSubscription ( WindowsAzureSubscription s ) : void
WindowsAzureProfile ( IProfileStore profileStore ) : System
WindowsAzureProfile ( IProfileStore profileStore, ITokenProvider tokenProvider ) : System

Create an instance of WindowsAzureProfile that stores data in the given store.

Private Methods

Method Description
AddSubscriptionInternal ( WindowsAzureSubscription subscription ) : void
AddSubscriptions ( List newSubscriptions ) : void
GuardEnvironmentExistsAndNonPublic ( string name ) : void
IsPublicEnvironment ( string name ) : bool
Load ( ) : void
LoadEnvironmentData ( ProfileData data ) : void
LoadSubscriptionData ( ProfileData data ) : void
Save ( ) : void
SetEnvironmentData ( ProfileData data ) : void
SetSubscriptionData ( ProfileData data ) : void
UpdateDefaultSubscription ( WindowsAzureSubscription newDefault ) : void

Method Details

AddAccounts() public method

Log in to the given environment, and download and add subscriptions for the given account in that environment.
public AddAccounts ( WindowsAzureEnvironment environment ) : string
environment WindowsAzureEnvironment environment that the subscription is in.
return string

AddEnvironment() public method

public AddEnvironment ( WindowsAzureEnvironment newEnvironment ) : void
newEnvironment WindowsAzureEnvironment
return void

AddSubscription() public method

public AddSubscription ( WindowsAzureSubscription s ) : void
s WindowsAzureSubscription
return void

DestroyData() public method

Destroy any saved data. Deletes the data store and removes any certificates from the certificate store.
public DestroyData ( ) : void
return void

ImportPublishSettings() public method

public ImportPublishSettings ( Stream stream ) : void
stream Stream
return void

ImportPublishSettings() public method

public ImportPublishSettings ( string fileName ) : void
fileName string
return void

RemoveEnvironment() public method

public RemoveEnvironment ( string name ) : void
name string
return void

RemoveSubscription() public method

public RemoveSubscription ( WindowsAzureSubscription s ) : void
s WindowsAzureSubscription
return void

ResetInstance() public static method

Reset the default instance, used when the instance has been replaced for testing.
public static ResetInstance ( ) : void
return void

UpdateEnvironment() public method

public UpdateEnvironment ( WindowsAzureEnvironment newEnvironment ) : void
newEnvironment WindowsAzureEnvironment
return void

UpdateSubscription() public method

public UpdateSubscription ( WindowsAzureSubscription s ) : void
s WindowsAzureSubscription
return void

WindowsAzureProfile() public method

public WindowsAzureProfile ( IProfileStore profileStore ) : System
profileStore IProfileStore
return System

WindowsAzureProfile() public method

Create an instance of WindowsAzureProfile that stores data in the given store.
public WindowsAzureProfile ( IProfileStore profileStore, ITokenProvider tokenProvider ) : System
profileStore IProfileStore Data store to read and write from.
tokenProvider ITokenProvider Token provider used to look up Active Directory tokens
return System