コード例 #1
0
 public StatisticsService(IGlobalHandler globalhandler, Configuration configuration, Database databaseProvider)
 {
     Workers = new Dictionary<string, Worker>();
     GlobalHandler = globalhandler;
     Configuration = configuration;
     Provider = databaseProvider;
 }
コード例 #2
0
ファイル: Worker.cs プロジェクト: christallire/RiotControl
        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();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: Kaimer/RiotControl
        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);
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: dimzy/RiotControl
        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);
        }
コード例 #5
0
ファイル: WebService.cs プロジェクト: Rejna/RiotControl
        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();
        }