File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace Delegateas.DeveloperExperience.Core;
66public record EnvironmentConfiguration (
77 string Name ,
88 string Description ,
9- InfrastructureEnvironment InfrastructureEnvironment ,
9+ string InfrastructureEnvironment ,
1010 string ApplicationEnvironment ,
1111 RuntimeEnvironment RuntimeEnvironment ,
1212 string TenantId ,
Original file line number Diff line number Diff line change @@ -137,17 +137,15 @@ private static EnvironmentConfiguration GetEnvironmentConfiguration(
137137 var applicationEnvironment =
138138 ( configuration [ "ASPNETCORE_ENVIRONMENT" ] ?? "local" ) . ToLower ( CultureInfo . InvariantCulture ) ;
139139
140+ var infrastructureEnvironment =
141+ ( configuration [ "INFRASTRUCTURE_ENVIRONMENT" ] ?? "dev" ) . ToLower ( CultureInfo . InvariantCulture ) ;
142+
140143 configuration
141144 . AddJsonFile ( "appsettings.json" , optional : true )
142145 . AddJsonFile ( $ "appsettings.{ applicationEnvironment } .json", optional : true ) ;
143146
144147 configuration . AddEnvironmentVariables ( ) ;
145148
146- Enum . TryParse < InfrastructureEnvironment > (
147- configuration [ "INFRASTRUCTURE_ENVIRONMENT" ] ,
148- ignoreCase : true ,
149- out var infrastructureEnvironment ) ; // Defaults to Dev
150-
151149 Enum . TryParse < RuntimeEnvironment > (
152150 configuration [ "RUNTIME_ENVIRONMENT" ] ,
153151 ignoreCase : true ,
You can’t perform that action at this time.
0 commit comments