C# Class Castle.DynamicProxy.ProxyGenerator

Generates a Java style proxy. This overrides the .Net proxy requirements that forces one to extend MarshalByRefObject or (for a different purpose) ContextBoundObject to have a Proxiable class.
The ProxyGenerator should be used to generate a class implementing the specified interfaces. The dynamic implementation will only calls the internal IInterceptor instance. Please note that this proxy implementation currently doesn't not supports ref and out arguments in methods. Also note that only virtual methods can be proxied in a class.
Exibir arquivo Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
CreateClassProxy ( Type baseClass, IInterceptor interceptor ) : object
CreateClassProxy ( Type baseClass, IInterceptor interceptor, bool checkAbstract ) : object
CreateClassProxy ( Type baseClass, Type interfaces, IInterceptor interceptor ) : object
CreateClassProxy ( Type baseClass, Type interfaces, IInterceptor interceptor, bool checkAbstract ) : object
CreateCustomClassProxy ( Type baseClass, IInterceptor interceptor, GeneratorContext context ) : object
CreateCustomClassProxy ( Type baseClass, IInterceptor interceptor, GeneratorContext context, bool checkAbstract ) : object
CreateCustomProxy ( Type theInterface, IInterceptor interceptor, object target, GeneratorContext context ) : object

CreateProxy ( Type theInterface, IInterceptor interceptor, object target ) : object

Generates a proxy implementing all the specified interfaces and redirecting method invocations to the specifed interceptor.

ProxyGenerator ( ) : System
ProxyGenerator ( IProxyBuilder builder ) : System

Protected Methods

Method Description
CreateClassProxyInstance ( Type type, IInterceptor interceptor ) : object
CreateCustomClassProxyInstance ( Type type, IInterceptor interceptor, GeneratorContext context ) : object
CreateCustomClassProxyInstance ( Type type, IInterceptor interceptor, GeneratorContext context, object target ) : object
CreateCustomProxyInstance ( Type type, IInterceptor interceptor, object target, GeneratorContext context ) : object
CreateProxyInstance ( Type type, IInterceptor interceptor, object target ) : object

Method Details

CreateClassProxy() public method

public CreateClassProxy ( Type baseClass, IInterceptor interceptor ) : object
baseClass System.Type
interceptor IInterceptor
return object

CreateClassProxy() public method

public CreateClassProxy ( Type baseClass, IInterceptor interceptor, bool checkAbstract ) : object
baseClass System.Type
interceptor IInterceptor
checkAbstract bool
return object

CreateClassProxy() public method

public CreateClassProxy ( Type baseClass, Type interfaces, IInterceptor interceptor ) : object
baseClass System.Type
interfaces System.Type
interceptor IInterceptor
return object

CreateClassProxy() public method

public CreateClassProxy ( Type baseClass, Type interfaces, IInterceptor interceptor, bool checkAbstract ) : object
baseClass System.Type
interfaces System.Type
interceptor IInterceptor
checkAbstract bool
return object

CreateClassProxyInstance() protected method

protected CreateClassProxyInstance ( Type type, IInterceptor interceptor ) : object
type System.Type
interceptor IInterceptor
return object

CreateCustomClassProxy() public method

public CreateCustomClassProxy ( Type baseClass, IInterceptor interceptor, GeneratorContext context ) : object
baseClass System.Type
interceptor IInterceptor
context GeneratorContext
return object

CreateCustomClassProxy() public method

public CreateCustomClassProxy ( Type baseClass, IInterceptor interceptor, GeneratorContext context, bool checkAbstract ) : object
baseClass System.Type
interceptor IInterceptor
context GeneratorContext
checkAbstract bool
return object

CreateCustomClassProxyInstance() protected method

protected CreateCustomClassProxyInstance ( Type type, IInterceptor interceptor, GeneratorContext context ) : object
type System.Type
interceptor IInterceptor
context GeneratorContext
return object

CreateCustomClassProxyInstance() protected method

protected CreateCustomClassProxyInstance ( Type type, IInterceptor interceptor, GeneratorContext context, object target ) : object
type System.Type
interceptor IInterceptor
context GeneratorContext
target object
return object

CreateCustomProxy() public method

public CreateCustomProxy ( Type theInterface, IInterceptor interceptor, object target, GeneratorContext context ) : object
theInterface System.Type
interceptor IInterceptor
target object The proxy target.
context GeneratorContext
return object

CreateCustomProxyInstance() protected method

protected CreateCustomProxyInstance ( Type type, IInterceptor interceptor, object target, GeneratorContext context ) : object
type System.Type
interceptor IInterceptor
target object
context GeneratorContext
return object

CreateProxy() public method

Generates a proxy implementing all the specified interfaces and redirecting method invocations to the specifed interceptor.
public CreateProxy ( Type theInterface, IInterceptor interceptor, object target ) : object
theInterface System.Type Interface to be implemented
interceptor IInterceptor instance of
target object The proxy target.
return object

CreateProxyInstance() protected method

protected CreateProxyInstance ( Type type, IInterceptor interceptor, object target ) : object
type System.Type
interceptor IInterceptor
target object
return object

ProxyGenerator() public method

public ProxyGenerator ( ) : System
return System

ProxyGenerator() public method

public ProxyGenerator ( IProxyBuilder builder ) : System
builder IProxyBuilder
return System