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