C# Class LinFu.IoC.Configuration.Loaders.ImplementsAttributeLoader

A loader class that scans a type for ImplementsAttribute attribute declarations and creates a factory for each corresponding attribute 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>

Converts a given System.Type into a set of Action{IServiceContainer} instances so that the IContainer instance can be loaded with the given factories.

Private Methods

Method Description
CreateFactory ( Type serviceType, Type implementingType, LifecycleType lifecycle ) : IFactory

Creates a factory instance that can create instaces of the given serviceType using the implementingType as the implementation.

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

Converts a given System.Type into a set of Action{IServiceContainer} instances so that the IContainer instance can be loaded with the given factories.
public Load ( Type sourceType ) : IEnumerable>
sourceType System.Type The input type from which one or more factories will be created.
return IEnumerable>