C# Класс Spring.Proxy.CompositionProxyTypeBuilder

Builds a proxy type using composition.
In order for this builder to work, the target must implement one or more interfaces.
Наследование: Spring.Proxy.AbstractProxyTypeBuilder
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
targetInstance System.Reflection.Emit.FieldBuilder

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

Метод Описание
BuildProxyType ( ) : Type

Creates a proxy that delegates calls to an instance of the target object.

Only interfaces can be proxied using composition, so the target must implement one or more interfaces.

CompositionProxyTypeBuilder ( ) : System

Creates a new instance of the CompositionProxyTypeBuilder class.

PushTarget ( ILGenerator il ) : void

Generates the IL instructions that pushes the target instance on which calls should be delegated to.

Защищенные методы

Метод Описание
CreateTargetProxyMethodBuilder ( TypeBuilder typeBuilder ) : IProxyMethodBuilder

Create an IProxyMethodBuilder to create interface implementations

DeclareTargetInstanceField ( TypeBuilder builder ) : void

Deaclares a field that holds the target object instance.

GenerateConstructor ( ConstructorBuilder builder, ILGenerator il, ConstructorInfo constructor ) : void

Generates the proxy constructor.

This implementation creates instance of the target object for delegation using constructor arguments.

ImplementCustom ( TypeBuilder builder ) : void

Allows subclasses to generate additional code

Описание методов

BuildProxyType() публичный Метод

Creates a proxy that delegates calls to an instance of the target object.

Only interfaces can be proxied using composition, so the target must implement one or more interfaces.

/// If the /// does not implement any interfaces. ///
public BuildProxyType ( ) : Type
Результат System.Type

CompositionProxyTypeBuilder() публичный Метод

Creates a new instance of the CompositionProxyTypeBuilder class.
public CompositionProxyTypeBuilder ( ) : System
Результат System

CreateTargetProxyMethodBuilder() защищенный Метод

Create an IProxyMethodBuilder to create interface implementations
protected CreateTargetProxyMethodBuilder ( TypeBuilder typeBuilder ) : IProxyMethodBuilder
typeBuilder System.Reflection.Emit.TypeBuilder
Результат IProxyMethodBuilder

DeclareTargetInstanceField() защищенный Метод

Deaclares a field that holds the target object instance.
protected DeclareTargetInstanceField ( TypeBuilder builder ) : void
builder System.Reflection.Emit.TypeBuilder /// The builder to use for code generation. ///
Результат void

GenerateConstructor() защищенный Метод

Generates the proxy constructor.

This implementation creates instance of the target object for delegation using constructor arguments.

protected GenerateConstructor ( ConstructorBuilder builder, ILGenerator il, ConstructorInfo constructor ) : void
builder System.Reflection.Emit.ConstructorBuilder The constructor builder to use.
il System.Reflection.Emit.ILGenerator The IL generator to use.
constructor System.Reflection.ConstructorInfo The constructor to delegate the creation to.
Результат void

ImplementCustom() защищенный Метод

Allows subclasses to generate additional code
protected ImplementCustom ( TypeBuilder builder ) : void
builder System.Reflection.Emit.TypeBuilder
Результат void

PushTarget() публичный Метод

Generates the IL instructions that pushes the target instance on which calls should be delegated to.
public PushTarget ( ILGenerator il ) : void
il System.Reflection.Emit.ILGenerator The IL generator to use.
Результат void

Описание свойств

targetInstance защищенное свойство

Target instance calls should be delegated to.
protected FieldBuilder,System.Reflection.Emit targetInstance
Результат System.Reflection.Emit.FieldBuilder