コード例 #1
0
        public StatisticsService(Program program, Configuration configuration, Database databaseProvider)
        {
            Workers = new Dictionary<string, Worker>();
            Program = program;
            Configuration = configuration;
            Provider = databaseProvider;

            InitialiseSummonerCache();
        }
コード例 #2
0
ファイル: Worker.cs プロジェクト: LeeSeungSoo/RiotControl
        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();
        }
コード例 #3
0
ファイル: WebService.cs プロジェクト: LeeSeungSoo/RiotControl
        public WebService(Configuration configuration, StatisticsService statisticsService, Database 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();
        }
コード例 #4
0
ファイル: WebService.cs プロジェクト: kumouri/RiotControl
        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();
        }
コード例 #5
0
ファイル: Worker.cs プロジェクト: kumouri/RiotControl
        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();
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: kumouri/RiotControl
        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;
        }
コード例 #7
0
ファイル: Program.cs プロジェクト: LeeSeungSoo/RiotControl
        static void Main(string[] arguments)
        {
            Configuration configuration;
            try
            {
                Nil.Serialiser<Configuration> serialiser = new Nil.Serialiser<Configuration>(ConfigurationPath);
                configuration = serialiser.Load();
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception.Message);
                return;
            }

            Database databaseProvider = new Database(configuration.Database);

            StatisticsService statisticsService = new StatisticsService(configuration, databaseProvider);
            statisticsService.Run();

            WebService webService = new WebService(configuration, statisticsService, databaseProvider);
            webService.Run();
        }
コード例 #8
0
 public StatisticsService(Configuration configuration, Database databaseProvider)
 {
     ServiceConfiguration = configuration;
     Provider = databaseProvider;
 }