Exemplo n.º 1
0
 /// <summary>
 /// 释放
 /// </summary>
 public void Dispose()
 {
     if (_instance != null)
     {
         lock (lockhelper)
         {
             if (_instance != null)
             {
                 this._info_dic = null;
                 _instance      = null;
             }
         }
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 获取单例
        /// </summary>
        /// <returns></returns>
        public static ConfigInfoHelper GetInstance()
        {
            if (_instance == null)
            {
                lock (lockhelper)
                {
                    if (_instance == null)
                    {
                        _instance = new ConfigInfoHelper();
                    }
                }
            }

            return(_instance);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取单例
        /// </summary>
        /// <returns></returns>
        public static ConfigInfoHelper GetInstance()
        {
            if (_instance == null)
            {
                lock (lockhelper)
                {
                    if (_instance == null)
                    {
                        _instance = new ConfigInfoHelper();
                    }
                }
            }

            return _instance;
        }
Exemplo n.º 4
0
 /// <summary>
 /// 释放
 /// </summary>
 public void Dispose()
 {
     if (_instance != null)
     {
         lock (lockhelper)
         {
             if (_instance != null)
             {
                 this._info_dic = null;
                 _instance = null;
             }
         }
     }
 }