38 references to WithAnnotation
Aspire.Hosting (23)
ApplicationModel\IResourceBuilder.cs (1)
29
IResourceBuilder<T> WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation, new() =>
WithAnnotation
(new TAnnotation(), behavior);
ContainerResourceBuilderExtensions.cs (6)
65
return builder.
WithAnnotation
(annotation);
81
return builder.
WithAnnotation
(annotation);
100
return builder.
WithAnnotation
(annotation);
263
return builder.
WithAnnotation
(annotation);
285
return builder.
WithAnnotation
(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace);
426
return builder.
WithAnnotation
(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace);
ProjectResourceBuilderExtensions.cs (4)
239
.
WithAnnotation
(new TProject())
325
builder.
WithAnnotation
(new ExcludeLaunchProfileAnnotation());
329
builder.
WithAnnotation
(new LaunchProfileAnnotation(options.LaunchProfileName));
337
builder.
WithAnnotation
(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName));
ResourceBuilderExtensions.cs (12)
34
return builder.
WithAnnotation
(new EnvironmentAnnotation(name, value ?? string.Empty));
94
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(name, callback));
109
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(callback));
124
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(callback));
252
return builder.
WithAnnotation
(new CommandLineArgsCallbackAnnotation(callback));
268
return builder.
WithAnnotation
(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace);
284
return builder.
WithAnnotation
(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace);
537
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(context =>
543
return builder.
WithAnnotation
(annotation);
637
return builder.
WithAnnotation
(new Http2ServiceAnnotation());
650
return builder.
WithAnnotation
(ManifestPublishingCallbackAnnotation.Ignore);
999
return builder.
WithAnnotation
(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted));
Aspire.Hosting.Azure.EventHubs (1)
AzureEventHubsExtensions.cs (1)
151
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
95
.
WithAnnotation
(new TProject())
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
78
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
Aspire.Hosting.Azure.Redis (1)
AzureRedisExtensions.cs (1)
68
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
Aspire.Hosting.Azure.Sql (1)
AzureSqlExtensions.cs (1)
41
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
Aspire.Hosting.Dapr (4)
IDistributedApplicationBuilderExtensions.cs (1)
54
.
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)
192
return builder.
WithAnnotation
(new CommandLineArgsCallbackAnnotation(context =>
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
432
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)
273
.
WithAnnotation
(new ReplicaAnnotation(2));
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
163
=> builder.
WithAnnotation
(new CommandLineArgsCallbackAnnotation(context =>