Exemple #1
0
        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);
        }
Exemple #2
0
        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;
        }
Exemple #3
0
 private DeviceModelService()
 {
     _daoManager     = ServiceConfig.GetInstance().DaoManager;
     _DeviceModelDao = _daoManager.GetDao(typeof(IDeviceModelDao)) as IDeviceModelDao;
 }
Exemple #4
0
 private PlantUserService()
 {
     _daoManager    = ServiceConfig.GetInstance().DaoManager;
     _iplantuserdao = _daoManager.GetDao(typeof(IPlantUserDao)) as IPlantUserDao;
 }
Exemple #5
0
 /// <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;
 }
Exemple #7
0
 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;
 }
Exemple #10
0
 private ManagerMonitorCodeService()
 {
     _daoManager         = ServiceConfig.GetInstance().DaoManager;
     _managerMonitorCode = _daoManager.GetDao(typeof(IManagerMonitorCodeSqlMapDao)) as IManagerMonitorCodeSqlMapDao;
 }
Exemple #11
0
 private ItemConfigService()
 {
     _daoManager    = ServiceConfig.GetInstance().DaoManager;
     _itemConfigDao = _daoManager.GetDao(typeof(IItemConfigDao)) as IItemConfigDao;
 }
Exemple #12
0
 public static void Reset(object obj)
 {
     _instance = null;
 }
 private AdminUserRoleServices()
 {
     _daoManager       = ServiceConfig.GetInstance().DaoManager;
     _adminUserRoleDao = _daoManager.GetDao(typeof(IAdminUserRoleDao)) as IAdminUserRoleDao;
 }
Exemple #14
0
 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;
 }
Exemple #16
0
 /// <summary>
 /// 创建一个不带参的构造函数
 /// </summary>
 private LanguageService()
 {
     //获取采集器接口
     _daoManager   = ServiceConfig.GetInstance().DaoManager;
     _lanaguageDao = _daoManager.GetDao(typeof(ILanguageDao)) as ILanguageDao;
 }
Exemple #17
0
 private DeviceRunDataService()
 {
     _daoManager       = ServiceConfig.GetInstance().DaoManager;
     _deviceRunDataDao = _daoManager.GetDao(typeof(IDeviceRunDataDao)) as IDeviceRunDataDao;
 }
Exemple #18
0
 private IntervalFaultService()
 {
     _daoManager = ServiceConfig.GetInstance().DaoManager;
     _faultDao   = _daoManager.GetDao(typeof(IFaultDao)) as IFaultDao;
 }
Exemple #19
0
 /// <summary>
 /// 创建一个不带参的构造函数
 /// </summary>
 private DbConfigService()
 {
     //获取采集器接口
     _daoManager  = ServiceConfig.GetInstance().DaoManager;
     _dbconfigDao = _daoManager.GetDao(typeof(IDbConfigDao)) as IDbConfigDao;
 }
Exemple #20
0
 private ErrorcodeService()
 {
     _daoManager   = ServiceConfig.GetInstance().DaoManager;
     _errorcodeDao = _daoManager.GetDao(typeof(IErrorcodeDao)) as IErrorcodeDao;
 }
Exemple #21
0
 private CountryCityService()
 {
     _daoManager     = ServiceConfig.GetInstance().DaoManager;
     _countryCityDao = _daoManager.GetDao(typeof(ICountryCityDao)) as ICountryCityDao;
 }
Exemple #22
0
 private ReportConfigService()
 {
     _daoManager      = ServiceConfig.GetInstance().DaoManager;
     _reportConfigDao = _daoManager.GetDao(typeof(IReportConfigDao)) as IReportConfigDao;
 }
Exemple #23
0
 private LoginRecordService()
 {
     _daoManager     = ServiceConfig.GetInstance().DaoManager;
     _loginRecordDao = _daoManager.GetDao(typeof(ILoginRecordDao)) as ILoginRecordDao;
 }
Exemple #24
0
 private MonitorItemService()
 {
     _daoManager     = ServiceConfig.GetInstance().DaoManager;
     _monitorItemDao = _daoManager.GetDao(typeof(IMonitorItemDao)) as IMonitorItemDao;
 }
Exemple #25
0
 private FaultService()
 {
     _daoManager = ServiceConfig.GetInstance().DaoManager;
     _faultDao   = _daoManager.GetDao(typeof(IFaultDao)) as IFaultDao;
     _deviceDao  = _daoManager.GetDao(typeof(IDeviceDao)) as IDeviceDao;
 }
Exemple #26
0
 private CommonInfoService()
 {
     _daoManager    = ServiceConfig.GetInstance().DaoManager;
     _commonInfoDao = _daoManager.GetDao(typeof(ICommonInfoDao)) as ICommonInfoDao;
 }
Exemple #27
0
 private MailCofnigService()
 {
     _daoManager = ServiceConfig.GetInstance().DaoManager;
     _mailDao    = _daoManager.GetDao(typeof(IMailConfigDao)) as IMailConfigDao;
 }
Exemple #28
0
 private PlantService()
 {
     _daoManager = ServiceConfig.GetInstance().DaoManager;
     _plantInfo  = _daoManager.GetDao(typeof(IPlantDao)) as IPlantDao;
 }
Exemple #29
0
 private DeviceDayDataService()
 {
     _daoManager            = ServiceConfig.GetInstance().DaoManager;
     _DevicePowerDaydataDao = _daoManager.GetDao(typeof(IDeviceDayDataDao)) as IDeviceDayDataDao;
 }
Exemple #30
0
 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;
 }