コード例 #1
0
        public virtual object CreateCustomClassProxy(Type baseClass, 
            IInvocationHandler handler, GeneratorContext context)
        {
            AssertCreateClassProxyArguments(baseClass, handler, context);

            Type newType = ProxyBuilder.CreateCustomClassProxy(baseClass, context);
            return CreateProxyInstance( newType, handler, context );
        }
コード例 #2
0
 protected virtual object CreateProxyInstance(Type type, IInvocationHandler handler, GeneratorContext context)
 {
     return CreateProxyInstance( type, handler );
 }
コード例 #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="interfaces"></param>
 /// <param name="handler"></param>
 /// <param name="context"></param>
 /// <returns></returns>
 public virtual object CreateCustomProxy(Type[] interfaces, 
     IInvocationHandler handler, GeneratorContext context)
 {
     AssertCreateProxyArguments( interfaces, handler, context );
     Type newType = ProxyBuilder.CreateCustomInterfaceProxy(interfaces, context);
     return CreateProxyInstance( newType, handler, context );
 }
コード例 #4
0
        protected static void AssertCreateProxyArguments(Type[] interfaces, IInvocationHandler handler, GeneratorContext context)
        {
            AssertCreateProxyArguments(interfaces, handler);

            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
        }
コード例 #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="theInterface"></param>
 /// <param name="handler"></param>
 /// <param name="context"></param>
 /// <returns></returns>
 public virtual object CreateCustomProxy(Type theInterface, 
     IInvocationHandler handler,
     GeneratorContext context)
 {
     return CreateCustomProxy( new Type[] { theInterface }, handler, context );
 }