static public ServiceConfig GetInstance() { if (_instance == null) { lock (_synRoot) { if (_instance == null) { ConfigureHandler handler = new ConfigureHandler(ServiceConfig.Reset); DomDaoManagerBuilder builder = new DomDaoManagerBuilder(); builder.ConfigureAndWatch("dao.config", handler); _instance = new ServiceConfig(); // TODO:默认为sqlMapDao指定的Context, 要提供对多个Context的支持. _instance._daoManager = IBatisNet.DataAccess.DaoManager.GetInstance("SqlMapDao"); } } } return(_instance); }
public static ServiceConfig GetInstance() { if (_instance == null) { lock (_synRoot) { if (_instance == null) { ConfigureHandler handler = new ConfigureHandler(ServiceConfig.Reset); DomDaoManagerBuilder builder = new DomDaoManagerBuilder(); builder.ConfigureAndWatch("dao.config", handler); _instance = new ServiceConfig(); // TODO:Ĭ��ΪsqlMapDaoָ����Context, Ҫ�ṩ�Զ��Context��֧��. _instance._daoManager = IBatisNet.DataAccess.DaoManager.GetInstance("SqlMapDao"); } } } return _instance; }
private DeviceModelService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _DeviceModelDao = _daoManager.GetDao(typeof(IDeviceModelDao)) as IDeviceModelDao; }
private PlantUserService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _iplantuserdao = _daoManager.GetDao(typeof(IPlantUserDao)) as IPlantUserDao; }
/// <summary> /// 创建一个不带参的构造函数 /// </summary> private MonitorConfigService() { //获取采集器接口 _daoManager = ServiceConfig.GetInstance().DaoManager; _mconfigDao = _daoManager.GetDao(typeof(IMonitorConfigDao)) as IMonitorConfigDao; }
private DeviceYearMonthDataService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _DeviceYearDataDao = _daoManager.GetDao(typeof(IDeviceYearMonthDataDao)) as IDeviceYearMonthDataDao; }
private UserRoleService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _userRoleDao = _daoManager.GetDao(typeof(IUserRoleDao)) as IUserRoleDao; }
private CollectorDayDataService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _powerDayDataDao = _daoManager.GetDao(typeof(ICollectorDayDataDao)) as ICollectorDayDataDao; }
private CustomChartService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _CustomReportDao = _daoManager.GetDao(typeof(ICustomChartDao)) as ICustomChartDao; }
private ManagerMonitorCodeService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _managerMonitorCode = _daoManager.GetDao(typeof(IManagerMonitorCodeSqlMapDao)) as IManagerMonitorCodeSqlMapDao; }
private ItemConfigService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _itemConfigDao = _daoManager.GetDao(typeof(IItemConfigDao)) as IItemConfigDao; }
public static void Reset(object obj) { _instance = null; }
private AdminUserRoleServices() { _daoManager = ServiceConfig.GetInstance().DaoManager; _adminUserRoleDao = _daoManager.GetDao(typeof(IAdminUserRoleDao)) as IAdminUserRoleDao; }
private AdpicService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _adpic = _daoManager.GetDao(typeof(IAdpic)) as IAdpic; }
private ReportDataItemService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _dataItemDao = _daoManager.GetDao(typeof(IReportDataItemDao)) as IReportDataItemDao; }
/// <summary> /// 创建一个不带参的构造函数 /// </summary> private LanguageService() { //获取采集器接口 _daoManager = ServiceConfig.GetInstance().DaoManager; _lanaguageDao = _daoManager.GetDao(typeof(ILanguageDao)) as ILanguageDao; }
private DeviceRunDataService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _deviceRunDataDao = _daoManager.GetDao(typeof(IDeviceRunDataDao)) as IDeviceRunDataDao; }
private IntervalFaultService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _faultDao = _daoManager.GetDao(typeof(IFaultDao)) as IFaultDao; }
/// <summary> /// 创建一个不带参的构造函数 /// </summary> private DbConfigService() { //获取采集器接口 _daoManager = ServiceConfig.GetInstance().DaoManager; _dbconfigDao = _daoManager.GetDao(typeof(IDbConfigDao)) as IDbConfigDao; }
private ErrorcodeService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _errorcodeDao = _daoManager.GetDao(typeof(IErrorcodeDao)) as IErrorcodeDao; }
private CountryCityService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _countryCityDao = _daoManager.GetDao(typeof(ICountryCityDao)) as ICountryCityDao; }
private ReportConfigService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _reportConfigDao = _daoManager.GetDao(typeof(IReportConfigDao)) as IReportConfigDao; }
private LoginRecordService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _loginRecordDao = _daoManager.GetDao(typeof(ILoginRecordDao)) as ILoginRecordDao; }
private MonitorItemService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _monitorItemDao = _daoManager.GetDao(typeof(IMonitorItemDao)) as IMonitorItemDao; }
private FaultService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _faultDao = _daoManager.GetDao(typeof(IFaultDao)) as IFaultDao; _deviceDao = _daoManager.GetDao(typeof(IDeviceDao)) as IDeviceDao; }
private CommonInfoService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _commonInfoDao = _daoManager.GetDao(typeof(ICommonInfoDao)) as ICommonInfoDao; }
private MailCofnigService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _mailDao = _daoManager.GetDao(typeof(IMailConfigDao)) as IMailConfigDao; }
private PlantService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _plantInfo = _daoManager.GetDao(typeof(IPlantDao)) as IPlantDao; }
private DeviceDayDataService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _DevicePowerDaydataDao = _daoManager.GetDao(typeof(IDeviceDayDataDao)) as IDeviceDayDataDao; }
private EmailQueueService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _emailQueueDao = _daoManager.GetDao(typeof(IEmailQueueDao)) as IEmailQueueDao; }
private CollectorYearMonthDataService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _plantYearDataDao = _daoManager.GetDao(typeof(ICollectorYearMonthDataDao)) as ICollectorYearMonthDataDao; }
private AdminControllerActionServices() { _daoManager = ServiceConfig.GetInstance().DaoManager; _adminControllerActionDao = _daoManager.GetDao(typeof(IAdminControllerActionDao)) as IAdminControllerActionDao; }