public object RecreateInterfaceProxy(SerializationInfo info, StreamingContext context)
        {
            GeneratorContext context2 = new GeneratorContext();

            foreach (object obj3 in this._mixins)
            {
                context2.AddMixinInstance(obj3);
            }
            InterfaceProxyGenerator generator = new InterfaceProxyGenerator(_scope, context2);
            object obj4 = info.GetValue("__target", typeof(object));

            if (this._mixins.Length == 0)
            {
                return(Activator.CreateInstance(generator.GenerateCode(this._interfaces, obj4.GetType()), new object[] { this._interceptor, obj4 }));
            }
            return(Activator.CreateInstance(generator.GenerateCode(this._interfaces, obj4.GetType()), new object[] { this._interceptor, obj4, context2.MixinsAsArray() }));
        }
Example #2
0
        public virtual Type CreateInterfaceProxy(Type[] interfaces, Type type)
        {
            InterfaceProxyGenerator generator = new InterfaceProxyGenerator(this._scope);

            return(generator.GenerateCode(interfaces, type));
        }
Example #3
0
        public virtual Type CreateCustomInterfaceProxy(Type[] interfaces, Type type, GeneratorContext context)
        {
            InterfaceProxyGenerator generator = new InterfaceProxyGenerator(this._scope, context);

            return(generator.GenerateCode(interfaces, type));
        }