Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
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);
        }