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
Namespace: X3Platform.DynamicProxyAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic class ProxyGenerator
public ref class ProxyGenerator
The ProxyGenerator type exposes the following members.
Constructors
Methods
| Name | Description |
---|
 | CreateClassProxy(Type, IInterceptor, Object) | |
 | CreateClassProxy(Type, Type, IInterceptor, Object) | |
 | CreateClassProxy(Type, IInterceptor, Boolean, Object) | |
 | CreateClassProxy(Type, Type, IInterceptor, Boolean, Object) | |
 | CreateClassProxyInstance | |
 | CreateCustomClassProxy(Type, IInterceptor, GeneratorContext, Object) | |
 | CreateCustomClassProxy(Type, IInterceptor, GeneratorContext, Boolean, Object) | |
 | CreateCustomClassProxyInstance(Type, IInterceptor, GeneratorContext, Object) | |
 | CreateCustomClassProxyInstance(Type, IInterceptor, GeneratorContext, Object) | |
 | CreateCustomProxy(Type, IInterceptor, Object, GeneratorContext) | |
 | CreateCustomProxy(Type, IInterceptor, Object, GeneratorContext) | |
 | CreateCustomProxyInstance | |
 | CreateProxy(Type, IInterceptor, Object) |
Generates a proxy implementing all the specified interfaces and
redirecting method invocations to the specifed interceptor.
|
 | CreateProxy(Type, IInterceptor, Object) |
Generates a proxy implementing all the specified interfaces and
redirecting method invocations to the specifed interceptor.
|
 | CreateProxyInstance | |
 | Equals | (Inherited from Object.) |
 | Finalize | (Inherited from Object.) |
 | GetHashCode | (Inherited from Object.) |
 | GetType | (Inherited from Object.) |
 | MemberwiseClone | (Inherited from Object.) |
 | ToString | (Inherited from Object.) |
Top
Properties
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.
ExamplesMyInvocationHandler interceptor = ...
ProxyGenerator generator = new ProxyGenerator();
IInterfaceExposed proxy =
generator.CreateProxy( new Type[] { typeof(IInterfaceExposed) }, interceptor );
See Also