C# Class LinFu.Proxy.MethodBodyEmitter

Inheritance: IMethodBodyEmitter, IInitialize
Afficher le fichier Open project: philiplaureano/LinFu Class Usage Examples

Méthodes publiques

Méthode Description
Emit ( MethodInfo originalMethod, Mono.Cecil.MethodDefinition targetMethod ) : void

Generates a method body for the targetMethod.

Initialize ( IServiceContainer source ) : void

Initializes the MethodBodyEmitter class.

MethodBodyEmitter ( ) : System

Initializes the class with the default values.

Méthodes protégées

Méthode Description
EmitGetInterceptorInstruction ( Mono.Cecil.Cil.CilWorker IL, TypeReference proxyType, MethodReference getInterceptorMethod ) : void

Emits the IL instructions to obtain an IInterceptor instance for the proxy type.

ImplementNotFound ( Mono.Cecil.Cil.CilWorker IL ) : void

Causes the CilWorker to make the method throw a NotImplementedException if the method cannot be found.

Private Methods

Méthode Description
SaveRefArguments ( Mono.Cecil.Cil.CilWorker IL, IEnumerable parameters, Mono.Cecil.Cil.VariableDefinition invocationInfo, Mono.Cecil.Cil.VariableDefinition arguments ) : void

Saves the ref arguments of a given method using the arguments from the invocationInfo object.

Method Details

Emit() public méthode

Generates a method body for the targetMethod.
public Emit ( MethodInfo originalMethod, Mono.Cecil.MethodDefinition targetMethod ) : void
originalMethod System.Reflection.MethodInfo The method currently being intercepted.
targetMethod Mono.Cecil.MethodDefinition The target method that will contain the new method body.
Résultat void

EmitGetInterceptorInstruction() protected méthode

Emits the IL instructions to obtain an IInterceptor instance for the proxy type.
protected EmitGetInterceptorInstruction ( Mono.Cecil.Cil.CilWorker IL, TypeReference proxyType, MethodReference getInterceptorMethod ) : void
IL Mono.Cecil.Cil.CilWorker The responsible for emitting the method body.
proxyType Mono.Cecil.TypeReference The proxy type.
getInterceptorMethod Mono.Cecil.MethodReference The getter method for the interceptor.
Résultat void

ImplementNotFound() protected méthode

Causes the CilWorker to make the method throw a NotImplementedException if the method cannot be found.
protected ImplementNotFound ( Mono.Cecil.Cil.CilWorker IL ) : void
IL Mono.Cecil.Cil.CilWorker The responsible for emitting the method body.
Résultat void

Initialize() public méthode

Initializes the MethodBodyEmitter class.
public Initialize ( IServiceContainer source ) : void
source IServiceContainer
Résultat void

MethodBodyEmitter() public méthode

Initializes the class with the default values.
public MethodBodyEmitter ( ) : System
Résultat System