C# Class Hiro.Functors.Core.FunctorRegistry

Represents a utility class that stores factory functor instances.
ファイルを表示 Open project: philiplaureano/Hiro Class Usage Examples

Public Methods

Method Description
AddFunctor ( string key, object>.Func functor ) : void

Adds a functor to the registry.

CreateInstance ( string key, IMicroContainer container ) : object

Creates the instance with the given container and functor key.

GetFunctor ( string key ) : object>.Func

Gets the functor associated with the given functor key.

Method Details

AddFunctor() public static method

Adds a functor to the registry.
public static AddFunctor ( string key, object>.Func functor ) : void
key string The key that uniquely identifies the functor.
functor object>.Func The functor instance.
return void

CreateInstance() public static method

Creates the instance with the given container and functor key.
public static CreateInstance ( string key, IMicroContainer container ) : object
key string The unique functor id.
container IMicroContainer The host container.
return object

GetFunctor() public static method

Gets the functor associated with the given functor key.
public static GetFunctor ( string key ) : object>.Func
key string The unique functor id.
return object>.Func