C# Class Hiro.Compilers.ServiceHashEmitter

Rrepesnts a class that adds a GetServiceHashCode method to a target type.
Datei anzeigen Open project: philiplaureano/Hiro Class Usage Examples

Public Methods

Method Description
AddGetServiceHashMethodTo ( Mono.Cecil.TypeDefinition targetType, bool shouldBeVisible ) : Mono.Cecil.MethodDefinition

Adds a GetServiceHashCode method to a target type.

Private Methods

Method Description
AddLocals ( Mono.Cecil.ModuleDefinition module, Mono body ) : Mono.Cecil.Cil.VariableDefinition

Adds the necessary local variables to the GetServiceHashCode method.

DefineOptions ( Mono.Cecil.TypeDefinition targetType, bool shouldBeVisible, MethodBuilderOptions options ) : void

Sets the default method options for the GetServiceHashCode method.

EmitGetServiceNameHashCode ( Mono.Cecil.Cil.ILProcessor il, MethodReference getHashCodeMethod, Mono.Cecil.Cil.VariableDefinition hashVariable ) : void

Emits the IL that calculates a hash code from a given service name.

EmitGetServiceTypeHashCode ( Mono.Cecil.ModuleDefinition module, Mono body, Mono.Cecil.Cil.ILProcessor il, MethodReference getHashCodeMethod ) : Mono.Cecil.Cil.VariableDefinition

Emits the IL that calculates a hash code from a given service type.

Method Details

AddGetServiceHashMethodTo() public method

Adds a GetServiceHashCode method to a target type.
public AddGetServiceHashMethodTo ( Mono.Cecil.TypeDefinition targetType, bool shouldBeVisible ) : Mono.Cecil.MethodDefinition
targetType Mono.Cecil.TypeDefinition The target type.
shouldBeVisible bool A boolean flag that indicates whether or not the method should be public.
return Mono.Cecil.MethodDefinition