Summer.Batch.Common.Proxy.ProxyFactory Class Reference

Factory for dynamic proxy. This factory can create a proxy for an interface. The created type will implement all the required interfaces as well as the IProxyObject interface. The method implementation redirect to the underlying instance. This instance can be changed and can be momentarilly be null, but it must be set when the proxy is manipulated. The created proxy supports, properties (including indexed properties), methods, and events. More...

Static Public Member Functions

static T Create< T > (Type superType=null, object instance=null)
 Creates a new proxy for the specified interface and optionally sets its underlying instance. More...
 
static object Create (Type @interface, Type superType=null, object instance=null)
 Creates a new proxy for the specified interface and optionally sets its underlying instance. More...
 
static object Create (IList< Type > interfaces, Type superType=null, object instance=null)
 Creates a new proxy for the specified interface and optionally sets its underlying instance. More...
 

Detailed Description

Factory for dynamic proxy. This factory can create a proxy for an interface. The created type will implement all the required interfaces as well as the IProxyObject interface. The method implementation redirect to the underlying instance. This instance can be changed and can be momentarilly be null, but it must be set when the proxy is manipulated. The created proxy supports, properties (including indexed properties), methods, and events.

Member Function Documentation

static object Summer.Batch.Common.Proxy.ProxyFactory.Create ( Type @  interface,
Type  superType = null,
object  instance = null 
)
static

Creates a new proxy for the specified interface and optionally sets its underlying instance.

Parameters
interfacethe interface to proxy
superTypethe super-type of the proxy object
instancethe underlying instance
Returns
a new proxy for the specified interface
static object Summer.Batch.Common.Proxy.ProxyFactory.Create ( IList< Type >  interfaces,
Type  superType = null,
object  instance = null 
)
static

Creates a new proxy for the specified interface and optionally sets its underlying instance.

Parameters
interfacesthe interfaces to proxy
superTypethe super-type of the proxy object
instancethe underlying instance
Returns
a new proxy for the specified interface
static T Summer.Batch.Common.Proxy.ProxyFactory.Create< T > ( Type  superType = null,
object  instance = null 
)
static

Creates a new proxy for the specified interface and optionally sets its underlying instance.

Template Parameters
T the interface to proxy
Parameters
superTypethe super-type of the proxy object
instancethe underlying instance
Returns
a new proxy for the specified interface

The documentation for this class was generated from the following file:
  • Summer.Batch.Common/Proxy/ProxyFactory.cs