Ejemplo n.º 1
0
        public EtController(Service.Service service)
        {
            this.dataStatusJudge = new DataStatusJudge(service);

            if (GlobalConfig.ConnectionString == null)
            {
                throw new Exception("GlobalConfig.ConnectionString is null");
            }

            if (GlobalConfig.DataSourcePath == null)
            {
                throw new Exception("GlobalConfig.DataSourcePath is null");
            }

            if (GlobalConfig.ErrorFilePath == null)
            {
                throw new Exception("GlobalConfig.ErrorFilePath is null");
            }
            if (!Directory.Exists(GlobalConfig.ErrorFilePath))
            {
                Directory.CreateDirectory(GlobalConfig.ErrorFilePath);
            }

            if (GlobalConfig.ParsedFilePath == null)
            {
                throw new Exception("GlobalConfig.ParsedFilePath is null");
            }
            if (!Directory.Exists(GlobalConfig.ParsedFilePath))
            {
                Directory.CreateDirectory(GlobalConfig.ParsedFilePath);
            }

            DacTaskResultConsumerService.Init();
            Log.Info("ET init success, scaning file to consume");
        }
Ejemplo n.º 2
0
        public void TestInit()
        {
            DacTaskResultConsumerService.Init();

            Assert.AreEqual(
                DacTaskResultConsumerService.GetConsumer("DataAnalyzer").GetType().ToString(),
                "FS.SMIS_Cloud.DAC.DataAnalyzer.DataAnalyzer");

            Assert.AreEqual(
                DacTaskResultConsumerService.GetConsumer("DataAnalyzer").GetType(),
                DacTaskResultConsumerService.Queues[0][5].GetType());
        }