Example #1
0
        public Bootstrapper()
        {
            var environment = EnvironmentUtility.GetCommandLineVariable("APP_ENVIRONMENT");

            _configuration = new ConfigurationBuilder()
                             .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                             .AddJsonFile($"appsettings.{environment}.json", optional: true, reloadOnChange: true)
                             .Build();

            var locale = _configuration.GetValue <string>("AppLocale");

            EnvironmentUtility.SetCurrentLocale(locale);

            MappingConfig.Configure();
        }