1 type derived from EnvironmentCallbackAnnotation
Aspire.Hosting (1)
ApplicationModel\EnvironmentAnnotation.cs (1)
10internal sealed class EnvironmentAnnotation : EnvironmentCallbackAnnotation
9 instantiations of EnvironmentCallbackAnnotation
Aspire.Hosting (6)
Dashboard\DashboardLifecycleHook.cs (1)
181dashboardResource.Annotations.Add(new EnvironmentCallbackAnnotation(ConfigureEnvironmentVariables));
OtlpConfigurationExtensions.cs (1)
38resource.Annotations.Add(new EnvironmentCallbackAnnotation(async context =>
ResourceBuilderExtensions.cs (4)
102return builder.WithAnnotation(new EnvironmentCallbackAnnotation(name, callback)); 117return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 132return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 597builder.WithAnnotation(new EnvironmentCallbackAnnotation(context =>
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
257builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusExtensions.cs (1)
379builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
Aspire.Hosting.Docker (1)
DockerComposeInfrastructure.cs (1)
90resourceWithEnv.Annotations.Add(new EnvironmentCallbackAnnotation(context =>
19 references to EnvironmentCallbackAnnotation
Aspire.Hosting (8)
ApplicationModel\EnvironmentCallbackAnnotation.cs (4)
17/// Initializes a new instance of the <see cref="EnvironmentCallbackAnnotation"/> class with the specified name and callback function. 35/// Initializes a new instance of the <see cref="EnvironmentCallbackAnnotation"/> class with the specified callback action. 50/// Initializes a new instance of the <see cref="EnvironmentCallbackAnnotation"/> class with the specified callback. 65/// Initializes a new instance of the <see cref="EnvironmentCallbackAnnotation"/> class with the specified callback.
ApplicationModel\ResourceExtensions.cs (2)
147public static bool TryGetEnvironmentVariables(this IResource resource, [NotNullWhen(true)] out IEnumerable<EnvironmentCallbackAnnotation>? environmentVariables) 350foreach (var callback in callbacks)
Publishing\ManifestPublishingContext.cs (2)
483/// Writes environment variables to the manifest base on the <see cref="IResource"/> resource's <see cref="EnvironmentCallbackAnnotation"/> annotations."/> 485/// <param name="resource">The <see cref="IResource"/> which contains <see cref="EnvironmentCallbackAnnotation"/> annotations.</param>
Aspire.Hosting.Azure (1)
AzureResourcePreparer.cs (1)
364foreach (var c in environmentCallbacks)
Aspire.Hosting.Azure.AppContainers (2)
ContainerAppContext.cs (2)
399if (resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var environmentCallbacks)) 403foreach (var c in environmentCallbacks)
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
48if (resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var environmentCallbacks)) 53foreach (var c in environmentCallbacks)
Aspire.Hosting.Azure.Tests (2)
AzureFunctionsTests.cs (2)
227Assert.True(functionsResource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var envAnnotations)); 230foreach (var envAnnotation in envAnnotations)
Aspire.Hosting.Docker (2)
DockerComposeEnvironmentContext.cs (2)
112if (serviceResource.TargetResource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var environmentCallbacks)) 120foreach (var callback in environmentCallbacks)
Aspire.Hosting.Kubernetes (2)
KubernetesResource.cs (2)
251if (resource.TryGetAnnotationsOfType<EnvironmentCallbackAnnotation>(out var environmentCallbacks)) 255foreach (var c in environmentCallbacks)