Exemplo n.º 1
0
        protected void Application_Start(object sender, EventArgs e)
        {
            AreaRegistration.RegisterAllAreas();

            // Тестировщик запросов к БД
            HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.Initialize();

            GlobalConfiguration.Configure(WebApiConfig.Register);

            // регистрация глобальных фильтров
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);

            // регистратор маршрутов
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            // хранилище ролей
            RoleConfig.RepositoryRoles();

            OpcPoller   = new OpcPoller();
            AlarmServer = new AlarmServer();
            Trends      = new Trend();
            OpcPoller.Init();
            if (AlarmServer.Init())
            {
                AlarmServer.Run();
            }
        }
Exemplo n.º 2
0
        void IAlarmSource.Initialize(IServiceProvider serviceProvider)
        {
            _settings = serviceProvider.GetService <ISettingsServiceInternal>();

            int outputPort = _settings.GetSetting(NetworkSettingKeys.OutputPort).GetValue <int>();

            _server = new AlarmServer(this, outputPort);
        }
Exemplo n.º 3
0
 void IAlarmSource.RunThread()
 {
     _server = new AlarmServer(this);
     _server.Start();
 }