1 type derived from EnvironmentCallbackAnnotation
Aspire.Hosting (1)
ApplicationModel\EnvironmentAnnotation.cs (1)
10internal sealed class EnvironmentAnnotation : EnvironmentCallbackAnnotation
16 instantiations of EnvironmentCallbackAnnotation
Aspire.Hosting (9)
Dashboard\DashboardEventHandlers.cs (1)
499dashboardResource.Annotations.Add(new EnvironmentCallbackAnnotation(ConfigureEnvironmentVariables));
OtlpConfigurationExtensions.cs (1)
59resource.Annotations.Add(new EnvironmentCallbackAnnotation(async context =>
ResourceBuilderExtensions.cs (4)
355return builder.WithAnnotation(new EnvironmentCallbackAnnotation(name, callback)); 371return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 388return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 1670builder.WithAnnotation(new EnvironmentCallbackAnnotation(context =>
TerminalResourceBuilderExtensions.cs (2)
249terminalHost.Annotations.Add(new EnvironmentCallbackAnnotation(ctx => 401host.Annotations.Add(new EnvironmentCallbackAnnotation(context =>
VolumeResourceBuilderExtensions.cs (1)
97builder.WithAnnotation(new EnvironmentCallbackAnnotation(
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
301builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusExtensions.cs (1)
443builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
Aspire.Hosting.Docker (1)
DockerComposeEnvironmentResource.cs (1)
391resourceWithEnv.Annotations.Add(new EnvironmentCallbackAnnotation(context =>
Aspire.Hosting.EntityFrameworkCore (1)
EFMigrationResourceBuilderExtensions.cs (1)
338migrationResource.Annotations.Add(new EnvironmentCallbackAnnotation(context =>
Aspire.Hosting.Kubernetes (2)
KubernetesEnvironmentResource.cs (1)
549resourceWithEnv.Annotations.Add(new EnvironmentCallbackAnnotation(context =>
KubernetesPersistentVolumeExtensions.cs (1)
452builder.WithAnnotation(new EnvironmentCallbackAnnotation(context =>
Aspire.Hosting.Tests (1)
WithOtlpExporterTests.cs (1)
232resource.Annotations.Add(new EnvironmentCallbackAnnotation(context =>
58 references to EnvironmentCallbackAnnotation
Aspire.Hosting (14)
ApplicationModel\EnvironmentCallbackAnnotation.cs (4)
21/// Initializes a new instance of the <see cref="EnvironmentCallbackAnnotation"/> class with the specified name and callback function. 39/// Initializes a new instance of the <see cref="EnvironmentCallbackAnnotation"/> class with the specified callback action. 54/// Initializes a new instance of the <see cref="EnvironmentCallbackAnnotation"/> class with the specified callback. 69/// Initializes a new instance of the <see cref="EnvironmentCallbackAnnotation"/> class with the specified callback.
ApplicationModel\EnvironmentVariablesConfigurationGatherer.cs (1)
24foreach (var ann in envVarAnnotations)
ApplicationModel\ResourceExtensions.cs (5)
162public static bool TryGetEnvironmentVariables(this IResource resource, [NotNullWhen(true)] out IEnumerable<EnvironmentCallbackAnnotation>? environmentVariables) 427foreach (var callback in callbacks) 1649foreach (var ann in envAnnotations) 1665foreach (var ann in envAnnotations) 1674foreach (var ann in envAnnotations)
ApplicationModel\VolumeMountBindingAnnotation.cs (1)
21/// an environment variable. The variable itself is written by an <see cref="EnvironmentCallbackAnnotation"/>
Dcp\DcpExecutor.cs (1)
1337foreach (var callback in envCallbacks)
Publishing\ManifestPublishingContext.cs (2)
530/// Writes environment variables to the manifest base on the <see cref="IResource"/> resource's <see cref="EnvironmentCallbackAnnotation"/> annotations."/> 532/// <param name="resource">The <see cref="IResource"/> which contains <see cref="EnvironmentCallbackAnnotation"/> annotations.</param>
Aspire.Hosting.Azure.AppContainers (2)
BaseContainerAppContext.cs (2)
131if (resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var environmentCallbacks)) 135foreach (var c in environmentCallbacks)
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
65if (resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var environmentCallbacks)) 70foreach (var c in environmentCallbacks)
Aspire.Hosting.Azure.Kusto.Tests (3)
AddAzureKustoTests.cs (3)
126var annotation = resourceBuilder.Resource.Annotations.OfType<EnvironmentCallbackAnnotation>().SingleOrDefault(); 433public static async Task<Dictionary<string, object>> GetEnvironmentVariables(this IDistributedApplicationTestingBuilder builder, EnvironmentCallbackAnnotation annotation)
Aspire.Hosting.Azure.Sandboxes (2)
AzureSandboxContainerDeployment.cs (2)
1107if (resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var callbacks)) 1114foreach (var callback in callbacks)
Aspire.Hosting.Azure.Tests (6)
AzureFunctionsTests.cs (6)
237Assert.True(functionsResource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var envAnnotations)); 240foreach (var envAnnotation in envAnnotations) 293Assert.True(funcApp.Resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var envAnnotations)); 296foreach (var envAnnotation in envAnnotations) 707Assert.True(functionsResource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var envAnnotations)); 710foreach (var envAnnotation in envAnnotations)
Aspire.Hosting.Blazor.Tests (2)
BlazorHostedExtensionsTests.cs (2)
514foreach (var callback in resource.Annotations.OfType<EnvironmentCallbackAnnotation>())
Aspire.Hosting.Docker (2)
DockerComposeEnvironmentContext.cs (2)
136if (serviceResource.TargetResource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var environmentCallbacks)) 144foreach (var callback in environmentCallbacks)
Aspire.Hosting.EntityFrameworkCore (4)
EFResourceBuilderExtensions.cs (4)
664if (migrationResource.ProjectResource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var envCallbacks)) 666foreach (var callback in envCallbacks) 680if (migrationResource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var migrationEnvCallbacks)) 682foreach (var callback in migrationEnvCallbacks)
Aspire.Hosting.Foundry (1)
HostedAgent\AzureHostedAgentResource.cs (1)
317foreach (var callback in callbacks)
Aspire.Hosting.Kubernetes (2)
KubernetesResource.cs (2)
393if (resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var environmentCallbacks)) 397foreach (var c in environmentCallbacks)
Aspire.Hosting.Orleans.Tests (2)
OrleansProviderTypeTests.cs (2)
123foreach (var callback in resource.Annotations.OfType<EnvironmentCallbackAnnotation>())
Aspire.Hosting.Radius (2)
Publishing\RadiusInfrastructureBuilder.cs (2)
1127if (resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var callbacks)) 1129foreach (var callback in callbacks)
Aspire.Hosting.Seq.Tests (1)
AddSeqTests.cs (1)
195var envAnnotations = containerResource.Annotations.OfType<EnvironmentCallbackAnnotation>();
Aspire.Hosting.Tests (13)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (10)
539var environmentCallback = owner.Resource.Annotations.OfType<EnvironmentCallbackAnnotation>().Single(); 613var environmentCallback = owner.Resource.Annotations.OfType<EnvironmentCallbackAnnotation>().Single(); 937var annotation = owner.Resource.Annotations.OfType<EnvironmentCallbackAnnotation>().Single(); 992var annotation = owner.Resource.Annotations.OfType<EnvironmentCallbackAnnotation>().Single(); 1202foreach (var annotation in resource.Annotations.OfType<EnvironmentCallbackAnnotation>())
ResourceDependencyTests.cs (2)
265var annotation = executable.Resource.Annotations.OfType<EnvironmentCallbackAnnotation>().Single();
WithEndpointTests.cs (1)
1003var envAnnotations = resource.Annotations.OfType<EnvironmentCallbackAnnotation>().ToList();