Ejemplo n.º 1
0
        public static void Init(IComponentControl componentControl)
        {
            if (componentControl == null)
            {
                throw new ArgumentNullException("componentControl");
            }
            ComponentControl = componentControl;

            // запустим тест самопроверки
            SelfTest = new ComponentSelfTest(ComponentControl);
            SelfTest.AddUnitTest("GetServerTime", GetServerTimeTest);
            SelfTest.AddUnitTest("CheckComponentControl", CheckComponentControl);
            SelfTest.StartTimer(TimeSpan.FromMinutes(1));
        }
        public static void Init(IComponentControl componentControl)
        {
            if (componentControl == null)
            {
                throw new ArgumentNullException("componentControl");
            }
            ComponentControl = componentControl;

            // запустим тест самопроверки
            SelfTest = new ComponentSelfTest(ComponentControl);
            SelfTest.AddUnitTest("CheckComponentControl", CheckComponentControl);
            SelfTest.AddUnitTest("CheckConfigDbContext", CheckConfigDbContext);
            SelfTest.AddUnitTest("AllCaches.Events.LastSaveException", () => CheckException(AllCaches.Events.LastSaveException));
            SelfTest.AddUnitTest("AllCaches.StatusDatas.LastSaveException", () => CheckException(AllCaches.StatusDatas.LastSaveException));
            SelfTest.AddUnitTest("AllCaches.UnitTests.LastSaveException", () => CheckException(AllCaches.UnitTests.LastSaveException));

            SelfTest.StartTimer(TimeSpan.FromMinutes(1));
            _saveCountersTimer = new Timer(SaveCounters, _saveCountersTimer, TimeSpan.FromMinutes(1), TimeSpan.FromMilliseconds(-1));

            //DeadLockHunter = new DeadLockHunter(componentControl);
        }