39 references to ResourceAnnotationMutationBehavior
Aspire.Hosting (32)
ApplicationModel\IResourceBuilder.cs (4)
29IResourceBuilder<T> WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation, new() => WithAnnotation(new TAnnotation(), behavior); 39IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation;
ApplicationModel\ResourceAnnotationMutationBehavior.cs (1)
7/// Specifies behavior of the <see cref="IResourceBuilder{T}.WithAnnotation{TAnnotation}(Aspire.Hosting.ApplicationModel.ResourceAnnotationMutationBehavior)" />
ContainerResourceBuilderExtensions.cs (12)
425return builder.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace); 439return builder.WithAnnotation(new ContainerImagePullPolicyAnnotation { ImagePullPolicy = pullPolicy }, ResourceAnnotationMutationBehavior.Replace); 517return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 520return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 635return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 638return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 854return builder.WithAnnotation(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace); 1017return builder.WithAnnotation(new ContainerCertificateTrustCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 1077return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1148return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1190return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1218builder.WithAnnotation(new ProxySupportAnnotation { ProxyEnabled = proxyEnabled }, ResourceAnnotationMutationBehavior.Replace);
CustomResourceExtensions.cs (1)
26return builder.WithAnnotation(new ResourceSnapshotAnnotation(initialSnapshot), ResourceAnnotationMutationBehavior.Replace);
DistributedApplicationResourceBuilder.cs (5)
14public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation 20if (behavior != ResourceAnnotationMutationBehavior.Append && behavior != ResourceAnnotationMutationBehavior.Replace) 27if (behavior == ResourceAnnotationMutationBehavior.Replace && Resource.Annotations.OfType<TAnnotation>().SingleOrDefault() is { } existingAnnotation)
ExecutableResourceExtensions.cs (1)
39return builder.WithAnnotation(new ExecutableCertificateTrustCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace);
ProjectResourceBuilderExtensions.cs (1)
638builder.WithAnnotation<DisableForwardedHeadersAnnotation>(ResourceAnnotationMutationBehavior.Replace);
ResourceBuilderExtensions.cs (7)
355return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 372return builder.WithAnnotation(new PublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 388return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 404return builder.WithAnnotation(new ConnectionStringRedirectAnnotation(resource), ResourceAnnotationMutationBehavior.Replace); 2107return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2155return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2201return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
395return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusExtensions.cs (1)
477return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
286return builder.WithAnnotation(new PersistenceAnnotation(interval), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Python (1)
PythonAppResourceBuilderExtensions.cs (1)
588ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
375new PersistenceAnnotation(interval, keysChangedThreshold), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Tests (1)
Utils\WithAnnotationTests.cs (1)
44redis.WithAnnotation<DummyAnnotation>(ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
282new PersistenceAnnotation(interval, keysChangedThreshold), ResourceAnnotationMutationBehavior.Replace);