C# Class GoogleCloudSamples.UnityConfig

Specifies the Unity configuration for the main container.
显示文件 Open project: GoogleCloudPlatform/getting-started-dotnet Class Usage Examples

Public Methods

Method 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 method

public static ChooseBookStoreFromConfig ( ) : BookStoreFlag
return BookStoreFlag

GetConfigVariable() public static method

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
return string

GetConfiguredContainer() public static method

Gets the configured Unity container.
public static GetConfiguredContainer ( ) : IUnityContainer
return IUnityContainer

RegisterTypes() public static method

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