62 references to ResourceAnnotationMutationBehavior
Aspire.Hosting (42)
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)" />
ApplicationModel\ResourceExtensions.cs (2)
490return builder.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Append); 511return builder.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Append);
ContainerResourceBuilderExtensions.cs (17)
74}), ResourceAnnotationMutationBehavior.Replace); 83}), ResourceAnnotationMutationBehavior.Append); 513return builder.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace); 528return builder.WithAnnotation(new ContainerImagePullPolicyAnnotation { ImagePullPolicy = pullPolicy }, ResourceAnnotationMutationBehavior.Replace); 627return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 632return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 775return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 776.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 780return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 781.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 1008return builder.WithAnnotation(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace); 1183}, ResourceAnnotationMutationBehavior.Replace); 1245return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1318return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1362return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1390builder.WithAnnotation(new ProxySupportAnnotation { ProxyEnabled = proxyEnabled }, ResourceAnnotationMutationBehavior.Replace); 1594}, ResourceAnnotationMutationBehavior.Replace);
CustomResourceExtensions.cs (1)
28return 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)
791builder.WithAnnotation<DisableForwardedHeadersAnnotation>(ResourceAnnotationMutationBehavior.Replace);
ResourceBuilderExtensions.cs (11)
433return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 451return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 469return builder.WithAnnotation(new ConnectionStringRedirectAnnotation(resource), ResourceAnnotationMutationBehavior.Replace); 2561return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2611return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2660return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2697return builder.WithAnnotation(new CertificateTrustConfigurationCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 2731return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2767return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2798return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2833return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append);
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
430return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusExtensions.cs (1)
522return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Azure.Sql (2)
AzureSqlServerResource.cs (2)
647public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
Aspire.Hosting.Azure.Tests (4)
AzureCosmosDBExtensionsTests.cs (4)
729}, ResourceAnnotationMutationBehavior.Replace); 761}, ResourceAnnotationMutationBehavior.Replace); 790}, ResourceAnnotationMutationBehavior.Replace); 820}, ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
301return builder.WithAnnotation(new PersistenceAnnotation(interval), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Maui (1)
MauiPlatformHelper.cs (1)
107resourceBuilder.WithAnnotation(new UnsupportedPlatformAnnotation(reason), ResourceAnnotationMutationBehavior.Append);
Aspire.Hosting.Python (5)
PythonAppResourceBuilderExtensions.cs (5)
1075ResourceAnnotationMutationBehavior.Replace); 1180.WithAnnotation(new PythonPackageManagerAnnotation(virtualEnvironment.GetExecutable("pip")), ResourceAnnotationMutationBehavior.Replace) 1181.WithAnnotation(new PythonInstallCommandAnnotation([.. baseInstallArgs, .. installArgs ?? []]), ResourceAnnotationMutationBehavior.Replace); 1248.WithAnnotation(new PythonPackageManagerAnnotation("uv"), ResourceAnnotationMutationBehavior.Replace) 1249.WithAnnotation(new PythonInstallCommandAnnotation(args), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
504new PersistenceAnnotation(interval, keysChangedThreshold), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.RemoteHost.Tests (2)
CapabilityDispatcherTests.cs (2)
1783public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
Aspire.Hosting.Tests (1)
Utils\WithAnnotationTests.cs (1)
45redis.WithAnnotation<DummyAnnotation>(ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
289new PersistenceAnnotation(interval, keysChangedThreshold), ResourceAnnotationMutationBehavior.Replace);