C# Class LinFu.AOP.Cecil.BaseMethodRewriter

Represents the basic implementation of a method rewriter class.
Inheritance: IMethodRewriter
Afficher le fichier Open project: philiplaureano/LinFu

Méthodes publiques

Méthode Description
AddAdditionalMembers ( Mono.Cecil.TypeDefinition host ) : void

Adds additional members to the host type.

AddLocals ( Mono.Cecil.MethodDefinition hostMethod ) : void

Adds local variables to the hostMethod.

ImportReferences ( Mono.Cecil.ModuleDefinition module ) : void

Adds additional references to the target module.

Rewrite ( Mono.Cecil.MethodDefinition method, Mono.Cecil.Cil.CilWorker IL, IEnumerable oldInstructions ) : void

Rewrites a target method using the given CilWorker.

Méthodes protégées

Méthode Description
RewriteMethodBody ( Mono.Cecil.MethodDefinition method, Mono.Cecil.Cil.CilWorker IL, IEnumerable oldInstructions ) : void

Rewrites the instructions in the target method body.

ShouldRewrite ( Mono.Cecil.MethodDefinition targetMethod ) : bool

Determines whether or not the given method should be modified.

Method Details

AddAdditionalMembers() public méthode

Adds additional members to the host type.
public AddAdditionalMembers ( Mono.Cecil.TypeDefinition host ) : void
host Mono.Cecil.TypeDefinition The host type.
Résultat void

AddLocals() public méthode

Adds local variables to the hostMethod.
public AddLocals ( Mono.Cecil.MethodDefinition hostMethod ) : void
hostMethod Mono.Cecil.MethodDefinition The target method.
Résultat void

ImportReferences() public méthode

Adds additional references to the target module.
public ImportReferences ( Mono.Cecil.ModuleDefinition module ) : void
module Mono.Cecil.ModuleDefinition The host module.
Résultat void

Rewrite() public méthode

Rewrites a target method using the given CilWorker.
public Rewrite ( Mono.Cecil.MethodDefinition method, Mono.Cecil.Cil.CilWorker IL, IEnumerable oldInstructions ) : void
method Mono.Cecil.MethodDefinition The target method.
IL Mono.Cecil.Cil.CilWorker The CilWorker that will be used to rewrite the target method.
oldInstructions IEnumerable The original instructions from the target method body.
Résultat void

RewriteMethodBody() protected abstract méthode

Rewrites the instructions in the target method body.
protected abstract RewriteMethodBody ( Mono.Cecil.MethodDefinition method, Mono.Cecil.Cil.CilWorker IL, IEnumerable oldInstructions ) : void
method Mono.Cecil.MethodDefinition The target method.
IL Mono.Cecil.Cil.CilWorker The instance that represents the method body.
oldInstructions IEnumerable The IL instructions of the original method body.
Résultat void

ShouldRewrite() protected méthode

Determines whether or not the given method should be modified.
protected ShouldRewrite ( Mono.Cecil.MethodDefinition targetMethod ) : bool
targetMethod Mono.Cecil.MethodDefinition The target method.
Résultat bool