42 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 (7)
62
return builder.
WithAnnotation
(annotation);
78
return builder.
WithAnnotation
(annotation);
97
return builder.
WithAnnotation
(annotation);
291
return builder.
WithAnnotation
(annotation);
316
return builder.
WithAnnotation
(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace);
451
return builder.
WithAnnotation
(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace);
619
builder.
WithAnnotation
(new ProxySupportAnnotation { ProxyEnabled = proxyEnabled }, ResourceAnnotationMutationBehavior.Replace);
ProjectResourceBuilderExtensions.cs (2)
239
.
WithAnnotation
(new TProject())
325
builder.
WithAnnotation
(new ExcludeLaunchProfileAnnotation());
ResourceBuilderExtensions.cs (12)
35
return builder.
WithAnnotation
(new EnvironmentAnnotation(name, value ?? string.Empty));
95
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(name, callback));
110
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(callback));
125
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(callback));
253
return builder.
WithAnnotation
(new CommandLineArgsCallbackAnnotation(callback));
269
return builder.
WithAnnotation
(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace);
285
return builder.
WithAnnotation
(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace);
564
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(context =>
570
return builder.
WithAnnotation
(annotation);
664
return builder.
WithAnnotation
(new Http2ServiceAnnotation());
677
return builder.
WithAnnotation
(ManifestPublishingCallbackAnnotation.Ignore);
1030
return builder.
WithAnnotation
(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted));
Aspire.Hosting.Azure.EventHubs (3)
AzureEventHubsExtensions.cs (3)
163
builder.
WithAnnotation
(defaultConfigFileMount);
181
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
390
builder.
WithAnnotation
(new ConfigJsonAnnotation(configJson));
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
95
.
WithAnnotation
(new TProject())
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
76
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
Aspire.Hosting.Azure.Redis (1)
AzureRedisExtensions.cs (1)
66
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
Aspire.Hosting.Azure.ServiceBus (3)
AzureServiceBusExtensions.cs (3)
245
builder.
WithAnnotation
(defaultConfigFileMount);
269
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
469
builder.
WithAnnotation
(new ConfigJsonAnnotation(configJson));
Aspire.Hosting.Azure.Sql (1)
AzureSqlExtensions.cs (1)
34
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
Aspire.Hosting.Dapr (4)
IDistributedApplicationBuilderExtensions.cs (1)
56
.
WithAnnotation
(new ManifestPublishingCallbackAnnotation(context => WriteDaprComponentResourceToManifest(context, resource)));
IDistributedApplicationComponentBuilderExtensions.cs (3)
70
return builder.
WithAnnotation
(new DaprSidecarAnnotation(sidecarBuilder.Resource));
82
return builder.
WithAnnotation
(new DaprSidecarOptionsAnnotation(options));
94
return builder.
WithAnnotation
(new DaprComponentReferenceAnnotation(component.Resource));
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
192
return builder.
WithAnnotation
(new CommandLineArgsCallbackAnnotation(context =>
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
434
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)
376
.
WithAnnotation
(new ReplicaAnnotation(2));
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
163
=> builder.
WithAnnotation
(new CommandLineArgsCallbackAnnotation(context =>