Beispiel #1
0
        protected void Application_Start()
        {
            log4net.Config.XmlConfigurator.Configure();

            //GlobalConfiguration.Configuration.DependencyResolver = new NinjectResolver();
            SetupDatabase();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            try
            {
                //TODO per DI das zeug reinladen
                var gateCampDetector = new GateCampDetector(new SqliteStargateLocationRepository());
                GateCampsWebSocketHandler.GateCampDetector = gateCampDetector;

                var gcd = new GateCampDetectionService(
                    gateCampDetector,
                    new GateCampDifferenceDetector());

                Task.Factory.StartNew(gcd.Start, TaskCreationOptions.LongRunning);
                Task.Factory.StartNew(() => { ZKillboardRedisqClient.Start(gcd); }, TaskCreationOptions.LongRunning);
            }
            catch (Exception e)
            {
                LOG.Error("error", e);
            }
            //Task.Factory.StartNew(ZKillboardStompFeedConsumer.Start, TaskCreationOptions.LongRunning);
            LOG.Info("Application started successfully");
        }
 public void Setup()
 {
     _locationRepository = new TestStargateLocationRepository();
     _gateCampDetector   = new GateCampDetector(_locationRepository);
 }