2 implementations of Environment
Aspire.Hosting (1)
DistributedApplicationBuilder.cs (1)
55public IHostEnvironment Environment => _innerBuilder.Environment;
Aspire.Hosting.Tests (1)
Utils\TestDistributedApplicationBuilder.cs (1)
126public IHostEnvironment Environment => _innerBuilder.Environment;
10 references to Environment
Aspire.Hosting (5)
OtlpConfigurationExtensions.cs (1)
121AddOtlpEnvironment(builder.Resource, builder.ApplicationBuilder.Configuration, builder.ApplicationBuilder.Environment);
ParameterResourceBuilderExtensions.cs (2)
131value = new UserSecretsParameterDefault(builder.AppHostAssembly, builder.Environment.ApplicationName, name, value); 329parameterResource.Default = new UserSecretsParameterDefault(builder.AppHostAssembly, builder.Environment.ApplicationName, name, parameterResource.Default);
ProjectResourceBuilderExtensions.cs (1)
299if (builder.ApplicationBuilder.ExecutionContext.IsRunMode && builder.ApplicationBuilder.Environment.IsDevelopment())
Utils\VolumeNameGenerator.cs (1)
31var safeApplicationName = Sanitize(builder.ApplicationBuilder.Environment.ApplicationName).ToLowerInvariant();
Aspire.Hosting.NodeJs (1)
NodeExtensions.cs (1)
72.WithEnvironment("NODE_ENV", builder.ApplicationBuilder.Environment.IsDevelopment() ? "development" : "production");
Aspire.Hosting.Tests (4)
PublishAsDockerfileTests.cs (3)
31"NODE_ENV": "{{builder.Environment.EnvironmentName.ToLowerInvariant()}}" 73"NODE_ENV": "{{builder.Environment.EnvironmentName.ToLowerInvariant()}}" 107"NODE_ENV": "{{builder.Environment.EnvironmentName.ToLowerInvariant()}}"
Utils\VolumeNameGeneratorTests.cs (1)
17var volumePrefix = $"{Sanitize(builder.Environment.ApplicationName).ToLowerInvariant()}-{builder.Configuration["AppHost:Sha256"]!.ToLowerInvariant()[..10]}";