Exemple #1
0
        /// <summary>
        /// 构造函数
        /// </summary>
        public ProxyGenerator(Func <Type, IAop> func)
        {
            this.assemblyDynamicBuilder = new AssemblyDynamicBuilder();
            this.classProxy             = new ClassProxy(this.assemblyDynamicBuilder, func);
            this.interfaceProxy         = new InterfaceProxy(this.assemblyDynamicBuilder, func);
            this.AopFunc = func;

            this.IsDisposed = false;
        }
Exemple #2
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     if (this.IsDisposed)
     {
         return;
     }
     this.IsDisposed             = true;
     this.assemblyDynamicBuilder = null;
     this.AopFunc = null;
     this.classProxy.Dispose();
     this.classProxy = null;
     this.interfaceProxy.Dispose();
     this.interfaceProxy = null;
 }