76 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);
404
return builder.
WithAnnotation
(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace);
418
return builder.
WithAnnotation
(new ContainerImagePullPolicyAnnotation { ImagePullPolicy = pullPolicy }, ResourceAnnotationMutationBehavior.Replace);
555
return builder.
WithAnnotation
(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace);
858
builder.
WithAnnotation
(new ProxySupportAnnotation { ProxyEnabled = proxyEnabled }, ResourceAnnotationMutationBehavior.Replace);
ProjectResourceBuilderExtensions.cs (2)
239
.
WithAnnotation
(new TProject())
325
builder.
WithAnnotation
(new ExcludeLaunchProfileAnnotation());
ResourceBuilderExtensions.cs (18)
38
return builder.
WithAnnotation
(new EnvironmentAnnotation(name, value ?? string.Empty));
102
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(name, callback));
117
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(callback));
132
return builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(callback));
268
return builder.
WithAnnotation
(new CommandLineArgsCallbackAnnotation(callback));
284
return builder.
WithAnnotation
(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace);
316
return builder.
WithAnnotation
(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace);
596
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation(context =>
602
return builder.
WithAnnotation
(annotation);
716
return builder.
WithAnnotation
(new Http2ServiceAnnotation());
772
return builder.
WithAnnotation
(new ResourceUrlsCallbackAnnotation(callback));
795
return builder.
WithAnnotation
(new ResourceUrlsCallbackAnnotation(callback));
816
return builder.
WithAnnotation
(new ResourceUrlsCallbackAnnotation(c => c.Urls.Add(new() { Url = url, DisplayText = displayText })));
859
return builder.
WithAnnotation
(new ResourceUrlsCallbackAnnotation(async c =>
984
return builder.
WithAnnotation
(ManifestPublishingCallbackAnnotation.Ignore);
1128
return builder.
WithAnnotation
(new ExplicitStartupAnnotation());
1428
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));
1493
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.ContainerRegistry (4)
AzureContainerRegistryExtensions.cs (2)
64
.
WithAnnotation
(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
82
builder.
WithAnnotation
(new ContainerRegistryReferenceAnnotation(registryBuilder.Resource));
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 (6)
AzureEventHubsExtensions.cs (4)
227
.
WithAnnotation
(new ContainerImageAnnotation
260
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
324
builder.
WithAnnotation
(new ContainerMountAnnotation(
437
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)
93
.
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 (6)
AzureServiceBusExtensions.cs (4)
360
.
WithAnnotation
(new ContainerImageAnnotation
381
builder.
WithAnnotation
(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) =>
460
builder.
WithAnnotation
(new ContainerMountAnnotation(
533
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)
38
builder.
WithAnnotation
(new AzureBicepResourceAnnotation(resource));
90
.
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.MySql (1)
MySqlBuilderExtensions.cs (1)
173
builder.
WithAnnotation
(new MySqlCreateDatabaseScriptAnnotation(script));
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());