22 references to ResourceAnnotationMutationBehavior
Aspire.Hosting (18)
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 (3)
241return builder.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace); 316return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 372return builder.WithAnnotation(new ContainerNameAnnotation { Name = name }, 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)
ProjectResourceBuilderExtensions.cs (1)
574builder.WithAnnotation<DisableForwardedHeadersAnnotation>(ResourceAnnotationMutationBehavior.Replace);
ResourceBuilderExtensions.cs (3)
220return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 233return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 246return builder.WithAnnotation(new ConnectionStringRedirectAnnotation(resource), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
198}), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
440}), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Tests (1)
Utils\WithAnnotationTests.cs (1)
46redis.WithAnnotation<DummyAnnotation>(ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
166}), ResourceAnnotationMutationBehavior.Replace);