C# Class Hiro.Compilers.GetInstanceMethodImplementor

Represents the default implementation of the IGetInstanceMethodImplementor interface.
Inheritance: IGetInstanceMethodImplementor
Show file Open project: philiplaureano/Hiro

Public Methods

Method Description
DefineGetInstanceMethod ( Mono.Cecil.TypeDefinition containerType, Mono.Cecil.ModuleDefinition module, Mono.Cecil.MethodDefinition getServiceHash, FieldDefinition jumpTargetField, IImplementation>.IDictionary serviceMap ) : void

Defines the IMicroContainer.GetInstance method implementation for the container type.

GetInstanceMethodImplementor ( ) : System

Initializes a new instance of the GetInstanceMethodImplementor class.

GetInstanceMethodImplementor ( IServiceInitializer initializer ) : System

Initializes a new instance of the GetInstanceMethodImplementor class.

Protected Methods

Method Description
EmitService ( Mono.Cecil.MethodDefinition getInstanceMethod, IDependency dependency, IImplementation implementation, IImplementation>.IDictionary serviceMap ) : void

Emits the instructions that will instantiate the target service.

Private Methods

Method Description
DefineServices ( IImplementation>.IDictionary serviceMap, Mono.Cecil.MethodDefinition getInstanceMethod, FieldDefinition jumpTargetField, Mono.Cecil.MethodDefinition getServiceHash, Mono.Cecil.Cil.ILProcessor il ) : void

Defines the instructions that create each service type in the serviceMap.

Method Details

DefineGetInstanceMethod() public method

Defines the IMicroContainer.GetInstance method implementation for the container type.
public DefineGetInstanceMethod ( Mono.Cecil.TypeDefinition containerType, Mono.Cecil.ModuleDefinition module, Mono.Cecil.MethodDefinition getServiceHash, FieldDefinition jumpTargetField, IImplementation>.IDictionary serviceMap ) : void
containerType Mono.Cecil.TypeDefinition The container type.
module Mono.Cecil.ModuleDefinition The target module.
getServiceHash Mono.Cecil.MethodDefinition The GetServiceHash method.
jumpTargetField Mono.Cecil.FieldDefinition The field that will store the jump target indexes.
serviceMap IImplementation>.IDictionary The service map that contains the list of existing services.
return void

EmitService() protected method

Emits the instructions that will instantiate the target service.
protected EmitService ( Mono.Cecil.MethodDefinition getInstanceMethod, IDependency dependency, IImplementation implementation, IImplementation>.IDictionary serviceMap ) : void
getInstanceMethod Mono.Cecil.MethodDefinition The method that will instantiate the target type.
dependency IDependency The target dependency
implementation IImplementation The implementation that will instantiate the dependency.
serviceMap IImplementation>.IDictionary The service map that contains the list of dependencies in the application.
return void

GetInstanceMethodImplementor() public method

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

GetInstanceMethodImplementor() public method

Initializes a new instance of the GetInstanceMethodImplementor class.
public GetInstanceMethodImplementor ( IServiceInitializer initializer ) : System
initializer IServiceInitializer The instance that will initialize the target given services.
return System