Exemplo n.º 1
0
        internal ProxyBuilder(ProxyAssembly assembly, TypeBuilder tb, Type proxyBaseType)
        {
            _assembly      = assembly;
            _tb            = tb;
            _proxyBaseType = proxyBaseType;

            _fields = new List <FieldBuilder>
            {
                //tb.DefineField("_provider", typeof(IProxyProvider), FieldAttributes.Private),
                //tb.DefineField("_key", typeof(object), FieldAttributes.Private),
                tb.DefineField("_handler", typeof(ProxyHandler), FieldAttributes.Private),
            };
        }
Exemplo n.º 2
0
 public AsyncProxyGenerator()
 {
     _proxyTypeCaches = new ConcurrentDictionary <Type, Dictionary <Type, Type> >();
     _proxyAssembly   = new ProxyAssembly();
 }