C# Class LinFu.AOP.Cecil.InterceptFieldAccess

Represents a MethodRewriter that intercepts calls to field getters and setters and redirects those calls to a IFieldInterceptor instance.
Inheritance: LinFu.AOP.Cecil.InstructionSwapper
Afficher le fichier Open project: philiplaureano/LinFu

Méthodes publiques

Méthode Description
AddLocals ( Mono.Cecil.MethodDefinition hostMethod ) : void

Adds locals to the target method.

ImportReferences ( Mono.Cecil.ModuleDefinition module ) : void

Adds references to the target module.

InterceptFieldAccess ( bool>.Func filter ) : System

Initializes a new instance of the InterceptFieldAccess class.

InterceptFieldAccess ( IFieldFilter filter ) : System

Initializes a new instance of the InterceptFieldAccess class.

Méthodes protégées

Méthode Description
Replace ( Instruction oldInstruction, Mono.Cecil.MethodDefinition hostMethod, Mono.Cecil.Cil.CilWorker IL ) : void

Replaces the oldInstruction with a set of new instructions.

ShouldReplace ( Instruction oldInstruction, Mono.Cecil.MethodDefinition hostMethod ) : bool

Determines whether or not the method rewriter should replace the oldInstruction.

The InterceptFieldAccess class only modifies instructions that get or set the value of static and instance fields.

Private Methods

Méthode Description
InterceptFieldAccess ( ) : System

Method Details

AddLocals() public méthode

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

ImportReferences() public méthode

Adds references to the target module.
public ImportReferences ( Mono.Cecil.ModuleDefinition module ) : void
module Mono.Cecil.ModuleDefinition The module that will be modified.
Résultat void

InterceptFieldAccess() public méthode

Initializes a new instance of the InterceptFieldAccess class.
public InterceptFieldAccess ( bool>.Func filter ) : System
filter bool>.Func The filter that determines which fields should be intercepted.
Résultat System

InterceptFieldAccess() public méthode

Initializes a new instance of the InterceptFieldAccess class.
public InterceptFieldAccess ( IFieldFilter filter ) : System
filter IFieldFilter The filter that determines which fields should be intercepted.
Résultat System

Replace() protected méthode

Replaces the oldInstruction with a set of new instructions.
protected Replace ( Instruction oldInstruction, Mono.Cecil.MethodDefinition hostMethod, Mono.Cecil.Cil.CilWorker IL ) : void
oldInstruction Mono.Cecil.Cil.Instruction The instruction currently being evaluated.
hostMethod Mono.Cecil.MethodDefinition The method that contains the target instruction.
IL Mono.Cecil.Cil.CilWorker The CilWorker that will be used to emit the method body instructions.
Résultat void

ShouldReplace() protected méthode

Determines whether or not the method rewriter should replace the oldInstruction.
The InterceptFieldAccess class only modifies instructions that get or set the value of static and instance fields.
protected ShouldReplace ( Instruction oldInstruction, Mono.Cecil.MethodDefinition hostMethod ) : bool
oldInstruction Mono.Cecil.Cil.Instruction The instruction that is currently being evaluated.
hostMethod Mono.Cecil.MethodDefinition The method that hosts the current instruction.
Résultat bool