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