Esempio n. 1
0
 public StatisticsService(IGlobalHandler globalhandler, Configuration configuration, Database databaseProvider)
 {
     Workers = new Dictionary<string, Worker>();
     GlobalHandler = globalhandler;
     Configuration = configuration;
     Provider = databaseProvider;
 }
Esempio n. 2
0
        public Worker(IGlobalHandler globalHandler, StatisticsService statisticsService, EngineRegionProfile regionProfile, Configuration configuration, Database provider)
        {
            Running = false;

            GlobalHandler = globalHandler;
            StatisticsService = statisticsService;
            Provider = provider;

            Configuration = configuration;
            Profile = regionProfile;

            AutomaticUpdatesThread = null;
            MassiveSummonerLookupThread = null;

            Connected = false;

            Profiler = new Profiler();
            ActiveAccountIds = new HashSet<int>();

            Region = (RegionType)Profile.Identifier;

            AutomaticUpdateInterval = configuration.AutomaticUpdateInterval;

            InitialiseAuthenticationProfile();
        }
Esempio n. 3
0
        public Program()
        {
            Serialiser = new Nil.Serialiser<Configuration>(ConfigurationPath);
            Configuration = Serialiser.Load();

            Database databaseProvider = new Database(Configuration);
            StatisticsService = new StatisticsService(this, Configuration, databaseProvider);
            WebService = new WebService(this, Configuration, StatisticsService, databaseProvider);
        }
Esempio n. 4
0
        public UpdateService(Configuration configuration, IGlobalHandler globalHandler, IUpdateHandler updateHandler = null)
        {
            Configuration = configuration.Updates;

            GlobalHandler = globalHandler;
            UpdateHandler = updateHandler;

            IsCommandLineVersion = UpdateHandler == null;
            IsMono = Type.GetType("Mono.Runtime") != null;

            CurrentRevision = Assembly.GetEntryAssembly().GetName().Version.Revision;
            NewestVersion = null;
        }
Esempio n. 5
0
        public Program()
        {
            Serialiser = new Nil.Serialiser<Configuration>(ConfigurationPath);
            Configuration = Serialiser.Load();
            //Check for configuration errors
            Configuration.Check();
            //Store it right away to automatically remove unused content and provide new default values
            Serialiser.Store(Configuration);

            Database databaseProvider = new Database(Configuration);
            StatisticsService = new StatisticsService(this, Configuration, databaseProvider);
            WebService = new WebService(this, Configuration, StatisticsService, databaseProvider);
            UpdateService = new UpdateService(Configuration, this);
        }
Esempio n. 6
0
        public WebService(IGlobalHandler globalHandler, Configuration configuration, StatisticsService statisticsService, Database databaseProvider)
        {
            GlobalHandler = globalHandler;
            ProgramConfiguration = configuration;
            ServiceConfiguration = configuration.Web;
            StatisticsService = statisticsService;
            Server = new WebServer(ServiceConfiguration.Host, ServiceConfiguration.Port, ServiceConfiguration.EnableReverseProxyRealIPMode, this, this);

            DatabaseProvider = databaseProvider;

            WebServiceProfiler = new Profiler();

            Serialiser = new JavaScriptSerializer();

            Views = new HashSet<string>();
            PRNG = new Random();

            LoadIndex();
            InitialiseHandlers();
        }