public ProxyClassBuildingContext(Type interfaceType, string path, TypeBuilder builder, ProxyClassFieldCache fields)
 {
     Fields = fields;
     Builder = builder;
     Path = path;
     InterfaceType = interfaceType;
 }
Example #2
0
 public ProxyClassBuildingContext(Type interfaceType, string path, TypeBuilder builder, ProxyClassFieldCache fields)
 {
     Fields        = fields;
     Builder       = builder;
     Path          = path;
     InterfaceType = interfaceType;
 }
Example #3
0
        private Type CreateProxyClass(Type rootInterfaceType, Type interfaceType, string path)
        {
            var serviceDescription = serviceDescriptionBuilder.Build(interfaceType);

            path = path ?? serviceDescription.Name;

            var typeBuilder  = DeclareType(interfaceType);
            var fieldCache   = new ProxyClassFieldCache(typeBuilder);
            var classContext = new ProxyClassBuildingContext(rootInterfaceType, path, typeBuilder, fieldCache);

            foreach (var methodDesc in serviceDescription.Methods)
            {
                CreateMethod(classContext, path, methodDesc);
            }
            CreateConstructor(classContext, path, serviceDescription);
            return(typeBuilder.CreateType());
        }
 public ProxyMethodEmittingContext(MyILGenerator il, ProxyClassFieldCache fieldCache)
     : base(il)
 {
     this.fieldCache = fieldCache;
 }
 public ProxyMethodEmittingContext(MyILGenerator il, ProxyClassFieldCache fieldCache) : base(il)
 {
     this.fieldCache = fieldCache;
 }