public StatisticsService(Program program, Configuration configuration, Database databaseProvider) { Workers = new Dictionary<string, Worker>(); Program = program; Configuration = configuration; Provider = databaseProvider; InitialiseSummonerCache(); }
public Worker(EngineRegionProfile regionProfile, Configuration configuration, Database provider) { Profile = regionProfile; Provider = provider; WorkerProfiler = new Profiler(); ActiveAccountIds = new HashSet<int>(); Connection = Provider.GetConnection(); ConnectionData = new ConnectionProfile(configuration.Authentication, regionProfile.Region, configuration.Proxy, Profile.Username, Profile.Password); Connect(); }
public RegionHandler(Configuration configuration, EngineRegionProfile regionProfile, DatabaseConnectionProvider databaseProvider) { ServiceConfiguration = configuration; Profile = regionProfile; DatabaseProvider = databaseProvider; LookupJobs = new Queue<LookupJob>(); ManualUpdateJobs = new Queue<AccountIdJob>(); AutomaticUpdateJobs = new Queue<AccountIdJob>(); AccountLocks = new Dictionary<int, AccountLock>(); Run(); }
public Worker(EngineRegionProfile regionProfile, Login login, Configuration configuration, RegionHandler regionHandler, DatabaseConnectionProvider databaseProvider) { RegionProfile = regionProfile; WorkerLogin = login; WorkerProfiler = new Profiler(); JobEvent = new AutoResetEvent(false); Master = regionHandler; DatabaseProvider = databaseProvider; Database = DatabaseProvider.GetConnection(); ConnectionData = new ConnectionProfile(configuration.Authentication, regionProfile.Region, configuration.Proxy, login.Username, login.Password); Connect(); }
public WebService(Configuration configuration, StatisticsService statisticsService, DatabaseConnectionProvider databaseProvider) { ProgramConfiguration = configuration; ServiceConfiguration = configuration.Web; Statistics = statisticsService; Server = new WebServer(ServiceConfiguration.Host, ServiceConfiguration.Port, Observe); DatabaseProvider = databaseProvider; WebServiceProfiler = new Profiler(); Serialiser = new JavaScriptSerializer(); LoadChampionNames(); LoadItemInformation(); InitialiseHandlers(); }
public WebService(Program program, Configuration configuration, StatisticsService statisticsService, Database databaseProvider) { Program = program; ProgramConfiguration = configuration; ServiceConfiguration = configuration.Web; StatisticsService = statisticsService; Server = new WebServer(ServiceConfiguration.Host, ServiceConfiguration.Port, Observe, ServiceConfiguration.EnableReverseProxyRealIPMode); DatabaseProvider = databaseProvider; WebServiceProfiler = new Profiler(); Serialiser = new JavaScriptSerializer(); Views = new HashSet<string>(); PRNG = new Random(); LoadIndex(); InitialiseHandlers(); }
public Worker(Program program, StatisticsService statisticsService, EngineRegionProfile regionProfile, Configuration configuration, Database provider) { Program = program; StatisticsService = statisticsService; Provider = provider; Configuration = configuration; Profile = regionProfile; Connected = false; Profiler = new Profiler(); ActiveAccountIds = new HashSet<int>(); Region = (RegionType)Profile.Identifier; AutomaticUpdateInterval = configuration.AutomaticUpdateInterval; InitialiseAuthenticationProfile(); }
public MainWindow(Configuration configuration, Program program, StatisticsService statisticsService) { InitializeComponent(); Configuration = configuration; Program = program; StatisticsService = statisticsService; IsFirstLine = true; DataContext = new MainWindowDataContext(configuration); Assembly entryAssembly = Assembly.GetEntryAssembly(); Version version = entryAssembly.GetName().Version; Title = string.Format("Riot Control r{0} ({1})", version.Revision, Nil.Assembly.GetAssemblyBuildTime(entryAssembly)); UpdateHelpLabel(); }
public bool Initialise() { try { Serialiser = new Nil.Serialiser<Configuration>(ConfigurationPath); Configuration = Serialiser.Load(); } catch (Exception exception) { MessageBox.Show(exception.Message); return false; } Database databaseProvider = new Database(Configuration.Database); StatisticsService = new StatisticsService(this, Configuration, databaseProvider); WebService = new WebService(this, Configuration, StatisticsService, databaseProvider); MainWindow = new MainWindow(Configuration, this, StatisticsService); return true; }
public StatisticsService(Configuration configuration, Database databaseProvider) { ServiceConfiguration = configuration; Provider = databaseProvider; }
public MainWindowDataContext(Configuration configuration) { List<RegionProperty> regions = (from x in configuration.RegionProfiles select new RegionProperty(x)).ToList(); Regions = CollectionViewSource.GetDefaultView(regions); }