C# Class Hiro.Implementations.FactoryCall

Represents a class that emits a call to an IFactory{T} instance to instantiate a particular service instance.
Inheritance: IImplementation
显示文件 Open project: philiplaureano/Hiro Class Usage Examples

Public Methods

Method Description
Emit ( IDependency dependency, IImplementation>.IDictionary serviceMap, Mono.Cecil.MethodDefinition targetMethod ) : void

Emits the IFactory{T}.Create method call that will instantiate the current service instance.

FactoryCall ( System serviceType, string serviceName ) : System

Initializes a new instance of the FactoryCall class.

GetMissingDependencies ( IDependencyContainer map ) : IEnumerable

Gets the list of missing dependencies from the current implementation.

GetRequiredDependencies ( IDependencyContainer map ) : IEnumerable

Returns the dependencies required by the current implementation.

Method Details

Emit() public method

Emits the IFactory{T}.Create method call that will instantiate the current service instance.
public Emit ( IDependency dependency, IImplementation>.IDictionary serviceMap, Mono.Cecil.MethodDefinition targetMethod ) : void
dependency IDependency The dependency that describes the service to be instantiated.
serviceMap IImplementation>.IDictionary The service map that contains the list of dependencies in the application.
targetMethod Mono.Cecil.MethodDefinition The target method.
return void

FactoryCall() public method

Initializes a new instance of the FactoryCall class.
public FactoryCall ( System serviceType, string serviceName ) : System
serviceType System The service type.
serviceName string The service name.
return System

GetMissingDependencies() public method

Gets the list of missing dependencies from the current implementation.
public GetMissingDependencies ( IDependencyContainer map ) : IEnumerable
map IDependencyContainer The implementation map.
return IEnumerable

GetRequiredDependencies() public method

Returns the dependencies required by the current implementation.
public GetRequiredDependencies ( IDependencyContainer map ) : IEnumerable
map IDependencyContainer The implementation map.
return IEnumerable