/// <summary> /// 实例化 /// </summary> public Container() { #if NET20 this.serviceDic = new Afx.Collections.SafeDictionary <Type, ServiceContext>(); #else this.serviceDic = new System.Collections.Concurrent.ConcurrentDictionary <Type, ServiceContext>(); #endif this.proxyGenerator = new DynamicProxy.ProxyGenerator(this.CreateAop); this.IsDisposed = false; }
/// <summary> /// Dispose /// </summary> public void Dispose() { if (this.IsDisposed) { return; } this.IsDisposed = true; this.assemblyDynamicBuilder = null; this.m_classProxyDic.Clear(); this.m_classProxyDic = null; }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { if (this.IsDisposed) { return; } this.serviceDic.Clear(); this.serviceDic = null; this.assemblyDic.Clear(); this.assemblyDic = null; this.proxyGenerator.Dispose(); this.proxyGenerator = null; }
/// <summary> /// Dispose /// </summary> public virtual void Dispose() { if (!this.isDisposed) { this.isDisposed = true; this.Reset(); this.MsgCmdCallDic.Clear(); this.MsgIdCallDic.Clear(); this.tcpClient.Dispose(); this.MsgCmdCallDic = null; this.MsgIdCallDic = null; this.tcpClient = null; } }
/// <summary> /// ClassProxy /// </summary> /// <param name="assemblyDynamicBuilder"></param> public ClassProxy(AssemblyDynamicBuilder assemblyDynamicBuilder, Func <Type, IAop> func) { if (assemblyDynamicBuilder == null) { throw new ArgumentNullException("assemblyDynamicBuilder"); } this.assemblyDynamicBuilder = assemblyDynamicBuilder; #if NET20 this.m_classProxyDic = new Afx.Collections.SafeDictionary <Type, Type>(); #else this.m_classProxyDic = new System.Collections.Concurrent.ConcurrentDictionary <Type, Type>(); #endif this.AopFunc = func; this.IsDisposed = false; }
private static Afx.Collections.SafeDictionary <Type, List <EnumInfoModel> > GetLangueDic(string langue) { Afx.Collections.SafeDictionary <Type, List <EnumInfoModel> > dic = null;