Example #1
0
        static public ServiceConfig GetInstance()
        {
            if (_instance == null)
            {
                lock (_synRoot)
                {
                    if (_instance == null)
                    {
                        ConfigureHandler handler = new ConfigureHandler(ServiceConfig.Reset);
                        DaoManager.ConfigureAndWatch(handler);

                        _instance             = new ServiceConfig();
                        _instance._daoManager = DaoManager.GetInstance("SqlMapDao");
                    }
                }
            }
            return(_instance);
        }
Example #2
0
 private AccountService()
 {
     _daoManager = ServiceConfig.GetInstance().DaoManager;
     _accountDao = _daoManager.GetDao(typeof(IAccountDao)) as IAccountDao;
 }
Example #3
0
 /// <summary>
 /// Reset the singleton
 /// </summary>
 /// <remarks>
 /// Must verify ConfigureHandler signature.
 /// </remarks>
 /// <param name="obj">
 /// </param>
 static public void Reset(object obj)
 {
     _instance = null;
 }