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 Program() { Startup.SetCurrentDirectory(); Serialiser = new Nil.Serialiser<RiotControlConfiguration>(ConfigurationPath); Configuration = Serialiser.Load(); //Check for configuration errors Configuration.Check(); //Upgrade outdated configurations Configuration.Upgrade(); //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, this); MainWindow = new MainWindow(Configuration, this, StatisticsService); }