C# Class Hiro.Implementations.BaseContainerCall

Represents a class that provides the basic fuctionality for a compiled IMicroContainer instance to compile itself.
Inheritance: IImplementation
显示文件 Open project: philiplaureano/Hiro

Public Methods

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

Emits the instructions that will instantiate the current implementation.

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.

Protected Methods

Method Description
BaseContainerCall ( System serviceType, string serviceName ) : System

Initializes a new instance of the NextContainerCall class.

EmitGetContainerInstance ( Mono.Cecil.ModuleDefinition module, TypeReference microContainerType, Mono.Cecil.Cil.ILProcessor il, Instruction skipCreate ) : void

Emits the instructions that will obtain the IMicroContainer instance.

Method Details

BaseContainerCall() protected method

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

Emit() public method

Emits the instructions that will instantiate the current implementation.
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

EmitGetContainerInstance() protected abstract method

Emits the instructions that will obtain the IMicroContainer instance.
protected abstract EmitGetContainerInstance ( Mono.Cecil.ModuleDefinition module, TypeReference microContainerType, Mono.Cecil.Cil.ILProcessor il, Instruction skipCreate ) : void
module Mono.Cecil.ModuleDefinition The target module.
microContainerType Mono.Cecil.TypeReference The type reference that points to the type.
il Mono.Cecil.Cil.ILProcessor The that points to the method body.
skipCreate Mono.Cecil.Cil.Instruction The skip label that will be used if the service cannot be instantiated.
return void

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