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); }
private AccountService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _accountDao = _daoManager.GetDao(typeof(IAccountDao)) as IAccountDao; }
/// <summary> /// Reset the singleton /// </summary> /// <remarks> /// Must verify ConfigureHandler signature. /// </remarks> /// <param name="obj"> /// </param> static public void Reset(object obj) { _instance = null; }