public StatisticsService(IGlobalHandler globalhandler, Configuration configuration, Database databaseProvider) { Workers = new Dictionary<string, Worker>(); GlobalHandler = globalhandler; Configuration = configuration; Provider = databaseProvider; }
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(); }
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); }
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; }
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); }
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(); }