Beispiel #1
0
        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);
        }
Beispiel #2
0
        public Program()
        {
            Startup.SetCurrentDirectory();

            Serialiser = new Nil.Serialiser<Configuration>(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);
        }
 public void Check()
 {
     Configuration.Check("Web.Host", Host);
 }
Beispiel #4
0
 public void Check()
 {
     Configuration.Check("Updates.UpdateURL", UpdateURL);
     Configuration.Check("Updates.ReleasePattern", ReleasePattern);
 }