Click or drag to resize
ProxyGenerator Class
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.
Inheritance Hierarchy
SystemObject
  X3Platform.DynamicProxyProxyGenerator

Namespace: X3Platform.DynamicProxy
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public class ProxyGenerator

The ProxyGenerator type exposes the following members.

Constructors
  NameDescription
Public methodProxyGenerator
Initializes a new instance of the ProxyGenerator class
Public methodProxyGenerator(IProxyBuilder)
Initializes a new instance of the ProxyGenerator class
Top
Methods
  NameDescription
Public methodCreateClassProxy(Type, IInterceptor, Object)
Public methodCreateClassProxy(Type, Type, IInterceptor, Object)
Public methodCreateClassProxy(Type, IInterceptor, Boolean, Object)
Public methodCreateClassProxy(Type, Type, IInterceptor, Boolean, Object)
Protected methodCreateClassProxyInstance
Public methodCreateCustomClassProxy(Type, IInterceptor, GeneratorContext, Object)
Public methodCreateCustomClassProxy(Type, IInterceptor, GeneratorContext, Boolean, Object)
Protected methodCreateCustomClassProxyInstance(Type, IInterceptor, GeneratorContext, Object)
Protected methodCreateCustomClassProxyInstance(Type, IInterceptor, GeneratorContext, Object)
Public methodCreateCustomProxy(Type, IInterceptor, Object, GeneratorContext)
Public methodCreateCustomProxy(Type, IInterceptor, Object, GeneratorContext)
Protected methodCreateCustomProxyInstance
Public methodCreateProxy(Type, IInterceptor, Object)
Generates a proxy implementing all the specified interfaces and redirecting method invocations to the specifed interceptor.
Public methodCreateProxy(Type, IInterceptor, Object)
Generates a proxy implementing all the specified interfaces and redirecting method invocations to the specifed interceptor.
Protected methodCreateProxyInstance
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Properties
  NameDescription
Public propertyProxyBuilder
Top
Remarks
The ProxyGenerator should be used to generate a class implementing the specified interfaces. The dynamic implementation will only calls the internal IInterceptor instance.
Remarks
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.
Examples
MyInvocationHandler interceptor = ...
ProxyGenerator generator = new ProxyGenerator();
IInterfaceExposed proxy = 
    generator.CreateProxy( new Type[] { typeof(IInterfaceExposed) }, interceptor );
See Also