C# Class Spring.Proxy.InheritanceProxyTypeBuilder

Builds a proxy type using inheritance.
In order for this builder to work, target methods have to be either , or belong to an interface.
Inheritance: Spring.Proxy.AbstractProxyTypeBuilder
Mostrar archivo Open project: spring-projects/spring-net Class Usage Examples

Public Methods

Method Description
BuildProxyType ( ) : Type

Creates a proxy that inherits the proxied object's class.

Only (non-final) methods can be proxied, unless they are members of one of the interfaces that target class implements. In that case, methods will be proxied using explicit interface implementation, which means that client code will have to cast the proxy to a specific interface in order to invoke the methods.

InheritanceProxyTypeBuilder ( ) : System

Creates a new instance of the InheritanceProxyTypeBuilder class.

PushTarget ( ILGenerator il ) : void

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

Protected Methods

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

Generates the proxy constructor.

This implementation delegates the call to a base class constructor.

Method Details

BuildProxyType() public method

Creates a proxy that inherits the proxied object's class.

Only (non-final) methods can be proxied, unless they are members of one of the interfaces that target class implements. In that case, methods will be proxied using explicit interface implementation, which means that client code will have to cast the proxy to a specific interface in order to invoke the methods.

public BuildProxyType ( ) : Type
return System.Type

GenerateConstructor() protected method

Generates the proxy constructor.

This implementation delegates the call to a base class constructor.

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 base class constructor to delegate the call to. ///
return void

InheritanceProxyTypeBuilder() public method

Creates a new instance of the InheritanceProxyTypeBuilder class.
public InheritanceProxyTypeBuilder ( ) : System
return System

PushTarget() public method

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.
return void