C# Class Hiro.Loaders.DependencyMapLoader

Represents a class that can load a dependency map from a given set o fassemblies
Mostra file Open project: philiplaureano/Hiro Class Usage Examples

Public Methods

Method Description
DependencyMapLoader ( ) : System

Initializes a new instance of the DependencyMapLoader class.

DependencyMapLoader ( IConstructorResolver constructorResolver ) : System

Initializes a new instance of the DependencyMapLoader class.

DependencyMapLoader ( IConstructorResolver constructorResolver, ITypeLoader typeLoader, IServiceLoader serviceLoader, IDefaultServiceResolver defaultServiceResolver ) : System

Initializes a new instance of the DependencyMapLoader class.

DependencyMapLoader ( ITypeLoader typeLoader, IServiceLoader serviceLoader, IDefaultServiceResolver defaultServiceResolver ) : System

Initializes a new instance of the DependencyMapLoader class.

LoadFrom ( Assembly assembly ) : DependencyMap

Loads a dependency map using the types in the given assembly.

LoadFrom ( IEnumerable assemblies ) : DependencyMap

Loads a dependency map using the types in the given assemblies.

LoadFrom ( string directory, string filePattern ) : DependencyMap

Loads a dependency map using the assemblies located in the target directory.

LoadFrom ( string directory, string filePattern, IAssemblyLoader assemblyLoader ) : DependencyMap

Loads a dependency map using the assemblies located in the target directory.

LoadFromBaseDirectory ( string filePattern ) : DependencyMap

Loads a dependency map using the assemblies located in the base application directory.

LoadFromBaseDirectory ( string filePattern, IAssemblyLoader assemblyLoader ) : DependencyMap

Loads a dependency map using the assemblies located in the base application directory.

Private Methods

Method Description
GetDefaultServices ( IDictionary serviceList ) : List

Gets the list of default services from a given service list.

GetServiceList ( IEnumerable assemblies ) : IServiceInfo>.HashList

Obtains a list of services (grouped by type) from the list of assemblies.

RegisterNamedFactoryType ( System type, IImplementation>.IDictionary defaultImplementations, IDependencyMap map ) : void

Registers a type as a factory type if it implements the IFactory{T} interface.

RegisterServicesFrom ( IEnumerable assemblies, DependencyMap map ) : void

Registers services from the given list of assemblies.

Method Details

DependencyMapLoader() public method

Initializes a new instance of the DependencyMapLoader class.
public DependencyMapLoader ( ) : System
return System

DependencyMapLoader() public method

Initializes a new instance of the DependencyMapLoader class.
public DependencyMapLoader ( IConstructorResolver constructorResolver ) : System
constructorResolver IConstructorResolver
return System

DependencyMapLoader() public method

Initializes a new instance of the DependencyMapLoader class.
public DependencyMapLoader ( IConstructorResolver constructorResolver, ITypeLoader typeLoader, IServiceLoader serviceLoader, IDefaultServiceResolver defaultServiceResolver ) : System
constructorResolver IConstructorResolver
typeLoader ITypeLoader The type loader that will load the service types from each assembly.
serviceLoader IServiceLoader The service loader that will load services from a given assembly.
defaultServiceResolver IDefaultServiceResolver The resolver that will determine the default anonymous implementation for a particular service type.
return System

DependencyMapLoader() public method

Initializes a new instance of the DependencyMapLoader class.
public DependencyMapLoader ( ITypeLoader typeLoader, IServiceLoader serviceLoader, IDefaultServiceResolver defaultServiceResolver ) : System
typeLoader ITypeLoader The type loader that will load the service types from each assembly.
serviceLoader IServiceLoader The service loader that will load services from a given assembly.
defaultServiceResolver IDefaultServiceResolver The resolver that will determine the default anonymous implementation for a particular service type.
return System

LoadFrom() public method

Loads a dependency map using the types in the given assembly.
public LoadFrom ( Assembly assembly ) : DependencyMap
assembly System.Reflection.Assembly The assembly that will be used to construct the dependency map.
return DependencyMap

LoadFrom() public method

Loads a dependency map using the types in the given assemblies.
public LoadFrom ( IEnumerable assemblies ) : DependencyMap
assemblies IEnumerable The list of assemblies that will be used to construct the dependency map.
return DependencyMap

LoadFrom() public method

Loads a dependency map using the assemblies located in the target directory.
public LoadFrom ( string directory, string filePattern ) : DependencyMap
directory string The directory that contains the assemblies that will be loaded into the dependency map.
filePattern string The search pattern that describes which assemblies will be loaded.
return DependencyMap

LoadFrom() public method

Loads a dependency map using the assemblies located in the target directory.
public LoadFrom ( string directory, string filePattern, IAssemblyLoader assemblyLoader ) : DependencyMap
directory string The directory that contains the assemblies that will be loaded into the dependency map.
filePattern string The search pattern that describes which assemblies will be loaded.
assemblyLoader IAssemblyLoader The assembly loader that will load assemblies into memory.
return DependencyMap

LoadFromBaseDirectory() public method

Loads a dependency map using the assemblies located in the base application directory.
public LoadFromBaseDirectory ( string filePattern ) : DependencyMap
filePattern string The search pattern that describes which assemblies will be loaded.
return DependencyMap

LoadFromBaseDirectory() public method

Loads a dependency map using the assemblies located in the base application directory.
public LoadFromBaseDirectory ( string filePattern, IAssemblyLoader assemblyLoader ) : DependencyMap
filePattern string The search pattern that describes which assemblies will be loaded.
assemblyLoader IAssemblyLoader The assembly loader that will load assemblies into memory.
return DependencyMap