C# Class LinFu.AOP.Cecil.InterceptMethodBody

Represents a method rewriter type that adds interception capabilities to any given method body.
Inheritance: BaseMethodRewriter
ファイルを表示 Open project: philiplaureano/LinFu

Public Methods

Method Description
InterceptMethodBody ( bool>.Func methodFilter ) : System

Initializes a new instance of the InterceptMethodBody class.

Protected Methods

Method 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.

Private Methods

Method Description
AddOriginalInstructions ( Mono.Cecil.Cil.CilWorker IL, IEnumerable oldInstructions ) : void
IsExcluded ( Mono.Cecil.MethodDefinition method ) : bool

Method Details

InterceptMethodBody() public method

Initializes a new instance of the InterceptMethodBody class.
public InterceptMethodBody ( bool>.Func methodFilter ) : System
methodFilter bool>.Func The method filter that will determine the methods with the method bodies that will be intercepted.
return System

RewriteMethodBody() protected method

Rewrites the instructions in the target method body.
protected 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.
return void

ShouldRewrite() protected method

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