C# Класс LinFu.AOP.Cecil.Extensions.NewOperatorInterceptionExtensions

An extension class that adds support for intercepting the 'new' operator with LinFu.AOP.
Показать файл Открыть проект

Открытые методы

Метод Описание
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