Exemplo n.º 1
0
 public virtual object CreateCustomClassProxy(Type baseClass,
                                              IInterceptor interceptor, GeneratorContext context,
                                              params object[] argumentsForConstructor)
 {
     return(CreateCustomClassProxy(baseClass, interceptor, context, true, argumentsForConstructor));
 }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="interfaces"></param>
        /// <param name="interceptor"></param>
        /// <param name="context"></param>
        /// <param name="target">The proxy target.</param>
        /// <returns></returns>
        public virtual object CreateCustomProxy(Type[] interfaces,
                                                IInterceptor interceptor, object target, GeneratorContext context)
        {
            AssertUtil.IsInterface(interfaces, "interfaces");
            AssertUtil.NotNull(interceptor, "interceptor");
            AssertUtil.NotNull(target, "target");
            AssertUtil.NotNull(context, "context");

            Type newType = ProxyBuilder.CreateCustomInterfaceProxy(interfaces, target.GetType(), context);

            return(CreateCustomProxyInstance(newType, interceptor, target, context));
        }
Exemplo n.º 3
0
 protected virtual object CreateCustomClassProxyInstance(Type type, IInterceptor interceptor,
                                                         GeneratorContext context, object target)
 {
     return(CreateProxyInstance(type, interceptor, target));
 }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="theInterface"></param>
 /// <param name="interceptor"></param>
 /// <param name="context"></param>
 /// <param name="target">The proxy target.</param>
 /// <returns></returns>
 public virtual object CreateCustomProxy(Type theInterface,
                                         IInterceptor interceptor, object target, GeneratorContext context)
 {
     return(CreateCustomProxy(new Type[] { theInterface }, interceptor, target, context));
 }