36 references to WithAnnotation
Aspire.Hosting (22)
ApplicationModel\IResourceBuilder.cs (1)
29IResourceBuilder<T> WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation, new() => WithAnnotation(new TAnnotation(), behavior);
ContainerResourceBuilderExtensions.cs (6)
53return builder.WithAnnotation(annotation); 66return builder.WithAnnotation(annotation); 81return builder.WithAnnotation(annotation); 221return builder.WithAnnotation(annotation); 241return builder.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace); 372return builder.WithAnnotation(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace);
ProjectResourceBuilderExtensions.cs (4)
221.WithAnnotation(new TProject()) 302builder.WithAnnotation(new ExcludeLaunchProfileAnnotation()); 306builder.WithAnnotation(new LaunchProfileAnnotation(options.LaunchProfileName)); 314builder.WithAnnotation(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName));
ResourceBuilderExtensions.cs (11)
30return builder.WithAnnotation(new EnvironmentAnnotation(name, value ?? string.Empty)); 79return builder.WithAnnotation(new EnvironmentCallbackAnnotation(name, callback)); 91return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 103return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 207return builder.WithAnnotation(new CommandLineArgsCallbackAnnotation(callback)); 220return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 233return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 467builder.WithAnnotation(new EnvironmentCallbackAnnotation(context => 473return builder.WithAnnotation(annotation); 557return builder.WithAnnotation(new Http2ServiceAnnotation()); 568return builder.WithAnnotation(ManifestPublishingCallbackAnnotation.Ignore);
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
180builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
56.WithAnnotation(new TProject())
Aspire.Hosting.Azure.Redis (1)
AzureRedisExtensions.cs (1)
96builder.WithAnnotation(new AzureBicepResourceAnnotation(resource));
Aspire.Hosting.Azure.Sql (1)
AzureSqlExtensions.cs (1)
101builder.WithAnnotation(new AzureBicepResourceAnnotation(resource));
Aspire.Hosting.Dapr (4)
IDistributedApplicationBuilderExtensions.cs (1)
55.WithAnnotation(new ManifestPublishingCallbackAnnotation(context => WriteDaprComponentResourceToManifest(context, resource)));
IDistributedApplicationComponentBuilderExtensions.cs (3)
67return builder.WithAnnotation(new DaprSidecarAnnotation(sidecarBuilder.Resource)); 78return builder.WithAnnotation(new DaprSidecarOptionsAnnotation(options)); 89return builder.WithAnnotation(new DaprComponentReferenceAnnotation(component.Resource));
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
189return builder.WithAnnotation(new CommandLineArgsCallbackAnnotation(context =>
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
433return builder.WithAnnotation(new CommandLineArgsCallbackAnnotation(context =>
Aspire.Hosting.Tests (3)
Utils\WithAnnotationTests.cs (2)
29.WithAnnotation<DummyAnnotation>(new DummyAnnotation()) 30.WithAnnotation<DummyAnnotation>(new DummyAnnotation());
WaitForTests.cs (1)
205.WithAnnotation(new ReplicaAnnotation(2));
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
160=> builder.WithAnnotation(new CommandLineArgsCallbackAnnotation(context =>