Ejemplo n.º 1
0
        public Startup(IConfiguration configuration, ICustomServiceProviderFactory factory, ILoggerFactory loggerFactory)
        {
            _factory = factory;
            _logger = loggerFactory.CreateLogger<Startup>();
            Configuration = configuration;

            Configuration["DEFAULT_SYSTEM_BASE_URI"] = Configuration["SYSTEMBASEURI"]??"http://localhost";
            Configuration["SIGNATURE_SECRET"] = Configuration["SIGNATURE_SECRET"]??"";

            Configuration["APP_NAME"] = Configuration["APP_NAME"]??"devperts-qmhandbuch";
            Configuration["BASE"] = $"/{Configuration["APP_NAME"]}";
            Configuration["ASSETS"] = Configuration["ASSET_BASE_PATH"]??$"{Configuration["DEFAULT_SYSTEM_BASE_URI"]}{Configuration["BASE"]}";
            
            _logger.LogInformation($"SYSTEMBASEURI: {Configuration["SYSTEMBASEURI"]}");
            _logger.LogInformation($"DEFAULT_SYSTEM_BASE_URI: {Configuration["DEFAULT_SYSTEM_BASE_URI"]}");
            _logger.LogInformation($"SIGNATURE_SECRET set: {!string.IsNullOrWhiteSpace(Configuration["SIGNATURE_SECRET"])}");
            _logger.LogInformation($"APP_NAME: {Configuration["APP_NAME"]}");
            _logger.LogInformation($"ASSETS: {Configuration["ASSETS"]}");
            _logger.LogInformation($"BASE: {Configuration["BASE"]}");
        }
Ejemplo n.º 2
0
 public EnvironmentAwareServiceProviderFactory(ICustomServiceProviderFactory customServiceProviderFactory)
 {
     _customServiceProviderFactory = customServiceProviderFactory;
 }