C# Class GoogleCloudSamples.UnityConfig

Specifies the Unity configuration for the main container.
Afficher le fichier Open project: GoogleCloudPlatform/getting-started-dotnet Class Usage Examples

Méthodes publiques

Méthode Description
ChooseBookStoreFromConfig ( ) : BookStoreFlag
GetConfigVariable ( string key ) : string

Looks for variable in app settings. Throws an exception of the key is not in the configuration.

GetConfiguredContainer ( ) : IUnityContainer

Gets the configured Unity container.

RegisterTypes ( IUnityContainer container ) : void

Registers the type mappings with the Unity container.

Method Details

ChooseBookStoreFromConfig() public static méthode

public static ChooseBookStoreFromConfig ( ) : BookStoreFlag
Résultat BookStoreFlag

GetConfigVariable() public static méthode

Looks for variable in app settings. Throws an exception of the key is not in the configuration.
public static GetConfigVariable ( string key ) : string
key string
Résultat string

GetConfiguredContainer() public static méthode

Gets the configured Unity container.
public static GetConfiguredContainer ( ) : IUnityContainer
Résultat IUnityContainer

RegisterTypes() public static méthode

Registers the type mappings with the Unity container.
public static RegisterTypes ( IUnityContainer container ) : void
container IUnityContainer The unity container to configure.
Résultat void