C# 클래스 LinFu.AOP.Cecil.Extensions.NewOperatorInterceptionExtensions

An extension class that adds support for intercepting the 'new' operator with LinFu.AOP.
파일 보기 프로젝트 열기: philiplaureano/LinFu

공개 메소드들

메소드 설명
InterceptAllNewInstances ( this target ) : void

Modifies a target to support intercepting all calls to the 'new' operator.

InterceptNewInstances ( this target, Func constructorFilter, bool>.Func methodFilter ) : void

Modifies a target assembly to support intercepting calls to the 'new' operator.

The type filter determines which concrete types and constructors should be intercepted at runtime. For example, the following functor code intercepts types named "Foo": Func<MethodReference, TypeReference, bool> filter = (constructor, concreteType, hostMethod) => concreteType.Name == "Foo";

InterceptNewInstances ( this target, bool>.Func typeFilter ) : void

Modifies a target assembly to support intercepting calls to the 'new' operator.

The type filter determines the concrete types that should be intercepted at runtime. For example, the following functor code intercepts types named "Foo": Func<TypeReference, bool> filter = concreteType => concreteType.Name == "Foo";

InterceptNewInstances ( this target, bool>.Func typeFilter, bool>.Func methodFilter ) : void

Modifies a target to support intercepting calls to the 'new' operator.

The type filter determines the concrete types that should be intercepted at runtime. For example, the following functor code intercepts types named "Foo": Func<TypeReference, bool> filter = concreteType => concreteType.Name == "Foo";

InterceptNewInstances ( this target, INewInstanceFilter newInstanceFilter, IMethodFilter methodFilter ) : void

Modifies the target to support intercepting calls to the 'new' operator.

InterceptNewInstancesWith ( this target, INewObjectWeaver weaver, bool>.Func filter ) : void

Modifies the methods in the given target using the custom INewObjectWeaver instance.

비공개 메소드들

메소드 설명
GetTypeFilter ( ) : bool>.Func

메소드 상세

InterceptAllNewInstances() 공개 정적인 메소드

Modifies a target to support intercepting all calls to the 'new' operator.
public static InterceptAllNewInstances ( this target ) : void
target this The assembly to be modified.
리턴 void

InterceptNewInstances() 공개 정적인 메소드

Modifies a target assembly to support intercepting calls to the 'new' operator.
The type filter determines which concrete types and constructors should be intercepted at runtime. For example, the following functor code intercepts types named "Foo": Func<MethodReference, TypeReference, bool> filter = (constructor, concreteType, hostMethod) => concreteType.Name == "Foo";
public static InterceptNewInstances ( this target, Func constructorFilter, bool>.Func methodFilter ) : void
target this The assembly to be modified.
constructorFilter Func The functor that determines which type instantiations should be intercepted.
methodFilter bool>.Func The filter that determines which host methods will be modified
리턴 void

InterceptNewInstances() 공개 정적인 메소드

Modifies a target assembly to support intercepting calls to the 'new' operator.
The type filter determines the concrete types that should be intercepted at runtime. For example, the following functor code intercepts types named "Foo": Func<TypeReference, bool> filter = concreteType => concreteType.Name == "Foo";
public static InterceptNewInstances ( this target, bool>.Func typeFilter ) : void
target this The assembly to be modified.
typeFilter bool>.Func The functor that determines which type instantiations should be intercepted.
리턴 void

InterceptNewInstances() 공개 정적인 메소드

Modifies a target to support intercepting calls to the 'new' operator.
The type filter determines the concrete types that should be intercepted at runtime. For example, the following functor code intercepts types named "Foo": Func<TypeReference, bool> filter = concreteType => concreteType.Name == "Foo";
public static InterceptNewInstances ( this target, bool>.Func typeFilter, bool>.Func methodFilter ) : void
target this The assembly to be modified.
typeFilter bool>.Func The functor that determines which type instantiations should be intercepted.
methodFilter bool>.Func The filter that determines which host methods will be modified
리턴 void

InterceptNewInstances() 공개 정적인 메소드

Modifies the target to support intercepting calls to the 'new' operator.
public static InterceptNewInstances ( this target, INewInstanceFilter newInstanceFilter, IMethodFilter methodFilter ) : void
target this The item to be modified.
newInstanceFilter INewInstanceFilter The filter that will determine which constructor calls should be intercepted.
methodFilter IMethodFilter The filter that will determine which host methods should be modified to support new instance interception.
리턴 void

InterceptNewInstancesWith() 공개 정적인 메소드

Modifies the methods in the given target using the custom INewObjectWeaver instance.
public static InterceptNewInstancesWith ( this target, INewObjectWeaver weaver, bool>.Func filter ) : void
target this The host that contains the methods that will be modified.
weaver INewObjectWeaver The custom that will replace all calls to the new operator with the custom code emitted by the given weaver.
filter bool>.Func The method filter that will determine which methods should be modified.
리턴 void