C# Class LinFu.IoC.Configuration.FactoryAttributeLoader

A class that injects custom IFactory and IFactory{T} instances into an IServiceContainer instance.
Inheritance: ITypeLoader
显示文件 Open project: philiplaureano/LinFu

Public Methods

Method Description
CanLoad ( Type sourceType ) : bool

Determines whether or not the current sourceType can be loaded.

Load ( Type sourceType ) : IEnumerable>

Loads an IFactory and IFactory{T} instance into a IServiceContainer instance using the given sourceType.

Private Methods

Method Description
GetFactory ( Type currentServiceType, IFactory>.Func getStronglyTypedFactory, ICollection implementedInterfaces ) : IFactory

Instantiates the given factory using the factory functor.

GetResults ( Type sourceType, IEnumerable attributeList, object>.Func getFactoryInstance ) : IEnumerable>

Instantiates the IFactory instances associated with the sourceType and adds those factories to the target container upon initialization.

Method Details

CanLoad() public method

Determines whether or not the current sourceType can be loaded.
public CanLoad ( Type sourceType ) : bool
sourceType System.Type The source type currently being loaded.
return bool

Load() public method

Loads an IFactory and IFactory{T} instance into a IServiceContainer instance using the given sourceType.
public Load ( Type sourceType ) : IEnumerable>
sourceType System.Type The input type from which one or more factories will be created.
return IEnumerable>