C# Class LinFu.IoC.Configuration.FactoryAttributeLoader

A class that injects custom IFactory and IFactory{T} instances into an IServiceContainer instance.
Inheritance: ITypeLoader
Afficher le fichier Open project: philiplaureano/LinFu

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

Load() public méthode

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.
Résultat IEnumerable>