69 references to WithAnnotation
Aspire.Hosting (29)
ApplicationModel\IResourceBuilder.cs (1)
29
IResourceBuilder<T> WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation, new() =>
WithAnnotation
(new TAnnotation(), behavior);
ContainerResourceBuilderExtensions.cs (8)
86
return builder.
WithAnnotation
(annotation);
126
return builder.
WithAnnotation
(annotation);
182
return builder.
WithAnnotation
(annotation);
377
return builder.
WithAnnotation
(annotation);
402
return builder.
WithAnnotation
(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace);
416
return builder.
WithAnnotation
(new ContainerImagePullPolicyAnnotation { ImagePullPolicy = pullPolicy }, ResourceAnnotationMutationBehavior.Replace);
553
return builder.
WithAnnotation
(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace);
856
builder.
WithAnnotation
(new ProxySupportAnnotation { ProxyEnabled = proxyEnabled }, ResourceAnnotationMutationBehavior.Replace);
ProjectResourceBuilderExtensions.cs (2)
239
.
WithAnnotation
(new TProject())
325
builder.
WithAnnotation
(new ExcludeLaunchProfileAnnotation());
ResourceBuilderExtensions.cs (18)
37
return builder.
WithAnnotation
(new EnvironmentAnnotation(name, value ?? string.Empty));
101
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(name, callback));
116
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(callback));
131
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(callback));
267
return builder.
WithAnnotation
(new CommandLineArgsCallbackAnnotation(callback));
283
return builder.
WithAnnotation
(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace);
299
return builder.
WithAnnotation
(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace);
579
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(context =>
585
return builder.
WithAnnotation
(annotation);
699
return builder.
WithAnnotation
(new Http2ServiceAnnotation());
755
return builder.
WithAnnotation
(new ResourceUrlsCallbackAnnotation(callback));
778
return builder.
WithAnnotation
(new ResourceUrlsCallbackAnnotation(callback));
799
return builder.
WithAnnotation
(new ResourceUrlsCallbackAnnotation(c => c.Urls.Add(new() { Url = url, DisplayText = displayText })));
842
return builder.
WithAnnotation
(new ResourceUrlsCallbackAnnotation(async c =>
967
return builder.
WithAnnotation
(ManifestPublishingCallbackAnnotation.Ignore);
1111
return builder.
WithAnnotation
(new ExplicitStartupAnnotation());
1386
return builder.
WithAnnotation
(new ResourceCommandAnnotation(name, displayName, commandOptions.UpdateState ?? (c => ResourceCommandState.Enabled), executeCommand, commandOptions.Description, commandOptions.Parameter, commandOptions.ConfirmationMessage, commandOptions.IconName, commandOptions.IconVariant, commandOptions.IsHighlighted));
1451
return builder.
WithAnnotation
(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted));
Aspire.Hosting.Azure.AppConfiguration (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.CognitiveServices (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
40
.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
Aspire.Hosting.Azure.EventHubs (5)
AzureEventHubsExtensions.cs (3)
256
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
349
builder.
WithAnnotation
(new ContainerMountAnnotation(
462
builder.
WithAnnotation
(new ConfigJsonAnnotation(configJson));
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.Functions (3)
AzureFunctionsProjectResourceExtensions.cs (1)
87
.
WithAnnotation
(new TProject())
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.KeyVault (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.PostgreSQL (2)
AzurePostgresExtensions.cs (2)
79
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
145
.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
Aspire.Hosting.Azure.Redis (2)
AzureRedisExtensions.cs (2)
66
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
125
.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
Aspire.Hosting.Azure.Search (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.ServiceBus (5)
AzureServiceBusExtensions.cs (3)
379
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
458
builder.
WithAnnotation
(new ContainerMountAnnotation(
567
builder.
WithAnnotation
(new ConfigJsonAnnotation(configJson));
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.SignalR (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.Sql (2)
AzureSqlExtensions.cs (2)
37
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
89
.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
Aspire.Hosting.Azure.Storage (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.WebPubSub (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15
return builder.
WithAnnotation
(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName)));
22
return builder.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
422
builder.
WithAnnotation
(new PostgresCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.SqlServer (1)
SqlServerBuilderExtensions.cs (1)
198
builder.
WithAnnotation
(new SqlServerCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.Tests (4)
ResourceExtensionsTests.cs (2)
306
.
WithAnnotation
(new DeploymentTargetAnnotation(compute1.Resource) { ComputeEnvironment = compute1.Resource })
307
.
WithAnnotation
(new DeploymentTargetAnnotation(compute2.Resource) { ComputeEnvironment = compute2.Resource });
Utils\WithAnnotationTests.cs (2)
29
.
WithAnnotation
<DummyAnnotation>(new DummyAnnotation())
30
.
WithAnnotation
<DummyAnnotation>(new DummyAnnotation());