C# Class LinFu.AOP.Interfaces.SimpleMethodReplacementProvider

Represents the simplest possible IMethodReplacementProvider implementation that will allow the user to use the original method body implementation as part of the interceptor call.
Inheritance: BaseMethodReplacementProvider
Exibir arquivo Open project: philiplaureano/LinFu

Public Methods

Method Description
SimpleMethodReplacementProvider ( IInterceptor replacement ) : System

Initializes a new instance of the SimpleMethodReplacementProvider class.

Protected Methods

Method Description
GetReplacement ( object host, IInvocationInfo context ) : IInterceptor

Gets the method replacement for a given invocation context.

ShouldReplace ( object host, IInvocationInfo context ) : bool

Determines whether or not a particular method body should be replaced at runtime.

Method Details

GetReplacement() protected method

Gets the method replacement for a given invocation context.
protected GetReplacement ( object host, IInvocationInfo context ) : IInterceptor
host object The host instance that contains the target method.
context IInvocationInfo The context surrounding the method call.
return IInterceptor

ShouldReplace() protected method

Determines whether or not a particular method body should be replaced at runtime.
protected ShouldReplace ( object host, IInvocationInfo context ) : bool
host object The host instance that contains the target method.
context IInvocationInfo The context surrounding the method call.
return bool

SimpleMethodReplacementProvider() public method

Initializes a new instance of the SimpleMethodReplacementProvider class.
public SimpleMethodReplacementProvider ( IInterceptor replacement ) : System
replacement IInterceptor The method body replacement interceptor.
return System