3 implementations of WithAnnotation
Aspire.Hosting (1)
DistributedApplicationResourceBuilder.cs (1)
14public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
734public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
Aspire.Hosting.RemoteHost.Tests (1)
CapabilityDispatcherTests.cs (1)
3051public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
617 references to WithAnnotation
Aspire.Hosting (113)
ApplicationModel\IResourceBuilder.cs (1)
29IResourceBuilder<T> WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation, new() => WithAnnotation(new TAnnotation(), behavior);
ApplicationModel\ResourceExtensions.cs (2)
553return builder.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Append); 573return builder.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Append);
ContainerRegistryResourceBuilderExtensions.cs (1)
194return builder.WithAnnotation(new ContainerRegistryReferenceAnnotation(registry.Resource));
ContainerResourceBuilderExtensions.cs (23)
51builder.WithAnnotation(new PipelineStepAnnotation((factoryContext) => 96return builder.WithAnnotation(new PipelineConfigurationAnnotation(context => 352return builder.WithAnnotation(annotation); 581return builder.WithAnnotation(annotation); 615.WithAnnotation(new PersistenceAnnotation 624.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace); 640return builder.WithAnnotation(new ContainerImagePullPolicyAnnotation { ImagePullPolicy = pullPolicy }, ResourceAnnotationMutationBehavior.Replace); 748return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 749.WithAnnotation(defaultContainerBuildOptions) 753return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 754.WithAnnotation(defaultContainerBuildOptions) 898return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 899.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 903return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 904.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 1140return builder.WithAnnotation(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace); 1341return builder.WithAnnotation(new ContainerCertificatePathsAnnotation 1433return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1505return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1548return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1812builder.WithAnnotation(callbackAnnotation); 1948return builder.WithAnnotation(new DockerfileBaseImageAnnotation 1976return builder.WithAnnotation(new ContainerNetworkAliasAnnotation(alias) { Network = KnownNetworkIdentifiers.DefaultAspireContainerNetwork });
CustomResourceExtensions.cs (1)
28return builder.WithAnnotation(new ResourceSnapshotAnnotation(initialSnapshot), ResourceAnnotationMutationBehavior.Replace);
DotnetProgramResourceBuilderExtensions.cs (2)
28builder.WithAnnotation(new ReplicaAnnotation(replicas)); 97return builder.WithAnnotation(new DotnetProgramBuildEnvironmentCallbackAnnotation(callback));
McpServerResourceBuilderExtensions.cs (1)
51return builder.WithAnnotation(new McpServerEndpointAnnotation(async (resource, cancellationToken) =>
Pipelines\PipelineStepFactoryExtensions.cs (6)
29return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 48return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 67return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 86return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 143return builder.WithAnnotation(new PipelineConfigurationAnnotation(callback)); 162return builder.WithAnnotation(new PipelineConfigurationAnnotation(callback));
ProjectResourceBuilderExtensions.cs (10)
302.WithAnnotation(projectMetadata) 352.WithAnnotation(new ProjectMetadata(projectPath)) 456.WithAnnotation(projectMetadata) 543builder.WithAnnotation(launchDefaults); 696builder.WithAnnotation(new ExcludeLaunchProfileAnnotation()); 700builder.WithAnnotation(new LaunchProfileAnnotation(options.LaunchProfileName)); 708builder.WithAnnotation(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName)); 976builder.WithAnnotation(new ReplicaAnnotation(replicas)); 1171.WithAnnotation(new ExplicitStartupAnnotation()) 1172.WithAnnotation(new ExcludeLifecycleCommandsAnnotation())
RequiredCommandResourceExtensions.cs (2)
38builder.WithAnnotation(new RequiredCommandAnnotation(command) 75builder.WithAnnotation(new RequiredCommandAnnotation(command)
ResourceBuilderExtensions.cs (56)
144return builder.WithAnnotation(new PersistenceAnnotation 197return builder.WithAnnotation(new PersistenceAnnotation 212return builder.WithAnnotation(new PersistenceAnnotation 249return builder.WithAnnotation(new EnvironmentAnnotation(name, value ?? string.Empty)); 371return builder.WithAnnotation(new EnvironmentCallbackAnnotation(name, callback)); 387return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 404return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 622return builder.WithAnnotation(new ConnectionPropertyAnnotation(name, value)); 640return builder.WithAnnotation(new ConnectionPropertyAnnotation(name, ReferenceExpression.Create($"{value}"))); 997return builder.WithAnnotation(new CommandLineArgsCallbackAnnotation(callback)); 1015return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 1033return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 1051return builder.WithAnnotation(new ConnectionStringRedirectAnnotation(resource), ResourceAnnotationMutationBehavior.Replace); 1135return builder.WithAnnotation(new ReferenceEnvironmentInjectionAnnotation(flags)); 1721builder.WithAnnotation(endpointReferenceAnnotation); 1928return builder.WithAnnotation(annotation); 1982builder.WithAnnotation(new EnvironmentCallbackAnnotation(context => 2011builder.WithAnnotation(new ProxySupportAnnotation { ProxyEnabled = proxyEnabled }, ResourceAnnotationMutationBehavior.Replace); 2237return builder.WithAnnotation(new Http2ServiceAnnotation()); 2303return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(callback)); 2334return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(callback)); 2390return builder.WithAnnotation(new ResourceUrlAnnotation { Url = url, DisplayText = displayText }); 2457return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(async c => 2663return builder.WithAnnotation(new ContainerFilesDestinationAnnotation() 2686return builder.WithAnnotation(new ContainerFilesSourceAnnotation() 2724return builder.WithAnnotation(ManifestPublishingCallbackAnnotation.Ignore); 2851return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilHealthy) { WaitBehavior = waitBehavior }); 2984return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilStarted) { WaitBehavior = waitBehavior }); 3014return builder.WithAnnotation(new ExplicitStartupAnnotation()); 3063return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitForCompletion, exitCode)); 3116builder.WithAnnotation(new HealthCheckAnnotation(key)); 3326return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, commandOptions.UpdateState ?? (c => ResourceCommandState.Enabled), executeCommand, commandOptions.Description, commandOptions.Parameter, commandOptions.Arguments, commandOptions.ConfirmationMessage, commandOptions.IconName, commandOptions.IconVariant, commandOptions.IsHighlighted, commandOptions.Visibility, commandOptions.ValidateArguments, commandOptions.Progress)); 3392return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted)); 4402return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4453return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4504return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4541return builder.WithAnnotation(new CertificateTrustConfigurationCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 4613return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4649return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4681return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4715return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 4877builder.WithAnnotation(new ResourceRelationshipAnnotation(resource, type)); 4919return builder.WithAnnotation(new ResourceRelationshipAnnotation(resource, KnownRelationshipTypes.Reference)); 4999return builder.WithAnnotation(new ResourceRelationshipAnnotation(resourceBuilder.Resource, KnownRelationshipTypes.Reference)); 5161return builder.WithAnnotation(new ResourceTypeDisplayNameAnnotation(resourceTypeDisplayName), ResourceAnnotationMutationBehavior.Replace); 5200return builder.WithAnnotation(new ResourceIconAnnotation(iconName, iconVariant), ResourceAnnotationMutationBehavior.Replace); 5220builder.WithAnnotation(new ComputeEnvironmentAnnotation(computeEnvironmentResource.Resource)); 5332return builder.WithAnnotation(new LaunchToolArgsCallbackAnnotation( 5471return builder.WithAnnotation(SupportsDebuggingAnnotation.Create( 5645return builder.WithAnnotation(probeAnnotation); 5660return builder.WithAnnotation(new ExcludeFromMcpAnnotation()); 5680return builder.WithAnnotation(new HiddenAnnotation(HiddenBehavior.Always), ResourceAnnotationMutationBehavior.Replace); 5700return builder.WithAnnotation(new HiddenAnnotation(HiddenBehavior.OnCompletion) { SuccessfulExitCodes = [exitCode] }, ResourceAnnotationMutationBehavior.Replace); 5751return builder.WithAnnotation(new HiddenAnnotation(HiddenBehavior.OnCompletion) { SuccessfulExitCodes = exitCodes.Count > 0 ? [.. exitCodes] : [0] }, ResourceAnnotationMutationBehavior.Replace); 5789return builder.WithAnnotation(new ContainerImagePushOptionsCallbackAnnotation(callback)); 5830return builder.WithAnnotation(new ContainerImagePushOptionsCallbackAnnotation(callback));
ResourceTraitBuilderExtensions.cs (2)
31return builder.WithAnnotation(annotation); 77builder.WithAnnotation(new DisplayOrderAnnotation(order), ResourceAnnotationMutationBehavior.Replace);
TerminalResourceBuilderExtensions.cs (2)
94builder.WithAnnotation(annotation); 99builder.WithAnnotation(new ForceProcessExecutionAnnotation());
VolumeResourceBuilderExtensions.cs (4)
68builder.WithAnnotation(new ContainerMountAnnotation(name, target, ContainerMountType.Volume, isReadOnly)); 85builder.WithAnnotation(new ContainerMountAnnotation(name, target, ContainerMountType.Volume, isReadOnly)); 96builder.WithAnnotation(binding); 97builder.WithAnnotation(new EnvironmentCallbackAnnotation(
Aspire.Hosting.Azure (4)
AzureUserAssignedIdentityExtensions.cs (1)
72builder.WithAnnotation(new AppIdentityAnnotation(identityResourceBuilder.Resource));
ExistingAzureResourceExtensions.cs (3)
715builder.WithAnnotation(CreateExistingAzureResourceAnnotation(name, resourceGroup, subscription, isTenantScope)); 728builder.WithAnnotation(CreateExistingAzureResourceAnnotation(name, resourceGroup, subscription, isTenantScope)); 739builder.WithAnnotation(CreateExistingAzureResourceAnnotation(name, resourceGroup, subscription, isTenantScope));
Aspire.Hosting.Azure.ApiManagement (1)
AzureApiManagementExtensions.cs (1)
153builder.WithAnnotation(new AppIdentityAnnotation(identityResourceBuilder.Resource), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Azure.AppConfiguration (3)
AzureAppConfigurationExtensions.cs (1)
113.WithAnnotation(new ContainerImageAnnotation
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.AppContainers (7)
AzureContainerAppContainerExtensions.cs (1)
48container.WithAnnotation(new AzureContainerAppCustomizationAnnotation(configure));
AzureContainerAppExecutableExtensions.cs (1)
48return executable.WithAnnotation(new AzureContainerAppCustomizationAnnotation(configure));
AzureContainerAppExtensions.cs (2)
1177builder.WithAnnotation(new AzureLogAnalyticsWorkspaceReferenceAnnotation(workspaceBuilder.Resource)); 1234builder.WithAnnotation(new AzureContainerAppEnvironmentAcrPullIdentityAnnotation(identityBuilder.Resource));
AzureContainerAppProjectExtensions.cs (1)
50project.WithAnnotation(new AzureContainerAppCustomizationAnnotation(configure));
ContainerAppExtensions.cs (1)
166resource.WithAnnotation(new AzureContainerAppJobCustomizationAnnotation(configure));
src\Shared\CrossScopeAcrPullIdentityPreparer.cs (1)
43builder.WithAnnotation(new PipelineStepAnnotation(context =>
Aspire.Hosting.Azure.ApplicationInsights (1)
AzureApplicationInsightsExtensions.cs (1)
141return builder.WithAnnotation(new LogAnalyticsWorkspaceReferenceAnnotation(workspaceId));
Aspire.Hosting.Azure.AppService (5)
AzureAppServiceComputeResourceExtensions.cs (3)
56builder = builder.WithAnnotation(new AzureAppServiceWebsiteCustomizationAnnotation(configure)); 61builder = builder.WithAnnotation(new AzureAppServiceWebsiteSlotCustomizationAnnotation(configureSlot)); 96return builder.WithAnnotation(new AzureAppServiceIgnoreEnvironmentVariableChecksAnnotation());
AzureAppServiceEnvironmentExtensions.cs (1)
542builder.WithAnnotation(new AzureAppServiceEnvironmentAcrPullIdentityAnnotation(identityBuilder.Resource));
src\Shared\CrossScopeAcrPullIdentityPreparer.cs (1)
43builder.WithAnnotation(new PipelineStepAnnotation(context =>
Aspire.Hosting.Azure.CognitiveServices (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.ContainerRegistry (4)
AzureContainerRegistryExtensions.cs (2)
53.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>())); 96builder.WithAnnotation(new ContainerRegistryReferenceAnnotation(registryBuilder.Resource));
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.CosmosDB (3)
AzureCosmosDBExtensions.cs (3)
46.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>())); 108builder.WithAnnotation(new EmulatorResourceAnnotation()); 112.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.EntraId.Tests (4)
EntraIdKeyVaultCertificateTests.cs (1)
86var vault = builder.AddAzureKeyVault("vault").WithAnnotation(new ContainerImageAnnotation { Image = "emulator" });
EntraIdProvisioningTests.cs (3)
518web.WithAnnotation(new AppIdentityAnnotation(identity.Resource)); 1642.WithAnnotation(customization); 1759.WithAnnotation(customization);
Aspire.Hosting.Azure.EventHubs (7)
AzureEventHubsExtensions.cs (5)
267builder.WithAnnotation(new EmulatorResourceAnnotation()); 274.WithAnnotation(new ContainerImageAnnotation 301builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) => 438return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace); 454builder.WithAnnotation(new ConfigJsonAnnotation(configJson));
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.FrontDoor (3)
AzureFrontDoorExtensions.cs (1)
217return builder.WithAnnotation(new AzureFrontDoorOriginAnnotation(resource.Resource));
AzureFrontDoorPrivateLinkExtensions.cs (2)
147frontDoor.WithAnnotation(new AzureFrontDoorPrivateLinkAnnotation(frontDoor.Resource, environment.Resource)); 151environment.WithAnnotation(new PrivateEndpointTargetAnnotation(frontDoor.Resource));
Aspire.Hosting.Azure.Functions (15)
AzureFunctionsProjectResourceExtensions.cs (7)
238.WithAnnotation(projectMetadata) 239.WithAnnotation(new AzureFunctionsAnnotation()) 240.WithAnnotation(new AzureFunctionsHostStorageAnnotation(storage), ResourceAnnotationMutationBehavior.Replace) 256functionsBuilder.WithAnnotation(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName)); 291.WithAnnotation(new AzureFunctionsAnnotation()) 292.WithAnnotation(new AzureFunctionsHostStorageAnnotation(storage), ResourceAnnotationMutationBehavior.Replace); 540return builder.WithAnnotation(new AzureFunctionsHostStorageAnnotation(storage), ResourceAnnotationMutationBehavior.Replace);
DurableTask\DurableTaskResourceExtensions.cs (6)
66builder.WithAnnotation(new DurableTaskSchedulerConnectionStringAnnotation(connectionString)); 98builder.WithAnnotation(new DurableTaskSchedulerConnectionStringAnnotation(connectionString.Resource)); 147builder.WithAnnotation(new EmulatorResourceAnnotation()); 158.WithAnnotation(new ContainerImageAnnotation 270return builder.WithAnnotation(new DurableTaskHubNameAnnotation(taskHubName)); 293return builder.WithAnnotation(new DurableTaskHubNameAnnotation(taskHubName.Resource));
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.KeyVault (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.Kubernetes (7)
AzureKubernetesEnvironmentExtensions.cs (7)
96k8sEnvBuilder.WithAnnotation(new ContainerRegistryReferenceAnnotation(defaultRegistry.Resource)); 108controlPlaneIdentity.WithAnnotation(new RoleAssignmentAnnotation(kubeletIdentity.Resource, 182controlPlaneIdentity.WithAnnotation(new RoleAssignmentAnnotation((AzureProvisioningResource)network, 206k8sEnvBuilder.WithAnnotation(new PipelineConfigurationAnnotation(context => 455builder.WithAnnotation(new AksSubnetAnnotation(subnet.Resource.Id), ResourceAnnotationMutationBehavior.Replace); 491builder.WithAnnotation(new AksSubnetAnnotation(subnet.Resource.Id)); 530builder.WithAnnotation(
Aspire.Hosting.Azure.Kubernetes.Tests (3)
AzureKubernetesEnvironmentExtensionsTests.cs (3)
1085builder.AddAzureKubernetesEnvironment("aks").WithAnnotation(ManifestPublishingCallbackAnnotation.Ignore); 1620.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("First", "Microsoft.Netapp/volumes")) 1621.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("Second", "Microsoft.Sql/managedInstances"));
Aspire.Hosting.Azure.Kusto (6)
AzureKustoBuilderExtensions.cs (4)
99.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>())); 170builder.WithAnnotation(new EmulatorResourceAnnotation()); 179.WithAnnotation(new ContainerImageAnnotation 209builder.WithAnnotation(new AzureKustoCreateDatabaseScriptAnnotation(script));
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.Kusto.Tests (1)
AddAzureKustoTests.cs (1)
102builder.WithAnnotation(new ContainerNameAnnotation() { Name = "custom-kusto-emulator" });
Aspire.Hosting.Azure.Network (3)
AzureInternalLoadBalancerExtensions.cs (1)
71builder.WithAnnotation(new InternalLoadBalancerAnnotation(virtualNetwork.Resource));
AzureVirtualNetworkExtensions.cs (2)
344builder.WithAnnotation( 407return builder.WithAnnotation(new AzureSubnetServiceDelegationAnnotation(name, serviceName));
Aspire.Hosting.Azure.PostgreSQL (2)
AzurePostgresExtensions.cs (2)
83builder.WithAnnotation(new AzureBicepResourceAnnotation(resource)); 153.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
Aspire.Hosting.Azure.Redis (3)
AzureManagedRedisExtensions.cs (1)
61.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
AzureRedisExtensions.cs (2)
66builder.WithAnnotation(new AzureBicepResourceAnnotation(resource)); 127.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
Aspire.Hosting.Azure.Sandboxes (6)
AzureSandboxesExtensions.cs (3)
172return builder.WithAnnotation( 293return builder.WithAnnotation( 521.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
src\Shared\CrossScopeAcrPullIdentityPreparer.cs (1)
43builder.WithAnnotation(new PipelineStepAnnotation(context =>
Aspire.Hosting.Azure.Search (2)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.ServiceBus (10)
AzureServiceBusExtensions.cs (8)
413builder.WithAnnotation(new EmulatorResourceAnnotation()); 421.WithAnnotation(new ContainerImageAnnotation 475builder.WithAnnotation(new SqlServerConnectionAnnotation(sqlServerBuilder.Resource, [])); 482builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) => 568return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace); 600builder.WithAnnotation(new ConfigJsonAnnotation(configJson)); 677return builder.WithAnnotation(new SqlServerConfigurationAnnotation(configureSqlServer)); 732return builder.WithAnnotation(new SqlServerConnectionAnnotation(sqlServer.Resource, waitAnnotations), ResourceAnnotationMutationBehavior.Replace);
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.SignalR (4)
AzureSignalRExtensions.cs (2)
160builder.WithAnnotation(new EmulatorResourceAnnotation()); 164.WithAnnotation(new ContainerImageAnnotation
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.Sql (3)
AzureSqlExtensions.cs (2)
42builder.WithAnnotation(new AzureBicepResourceAnnotation(resource)); 97.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
AzureSqlServerResource.cs (1)
560.WithAnnotation(new ExistingAzureResourceAnnotation(AdminName));
Aspire.Hosting.Azure.Storage (4)
AzureStorageExtensions.cs (2)
199builder.WithAnnotation(new EmulatorResourceAnnotation()); 204.WithAnnotation(new ContainerImageAnnotation
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Azure.Tests (44)
AzureAppServiceTests.cs (1)
798.WithAnnotation(new AzureAppServiceWebsiteCustomizationAnnotation((_, _) => { }));
AzureContainerAppsTests.cs (2)
2005.WithAnnotation(new AzureContainerAppCustomizationAnnotation((_, _) => { })); 2008.WithAnnotation(new AzureContainerAppJobCustomizationAnnotation((_, _) => { }));
AzureCosmosDBExtensionsTests.cs (4)
798cosmos.WithAnnotation(new HttpsCertificateAnnotation 829cosmos.WithAnnotation(new HttpsCertificateAnnotation 859cosmos.WithAnnotation(new HttpsCertificateAnnotation 888cosmos.WithAnnotation(new HttpsCertificateAnnotation
AzureEnvironmentResourceExtensionsTests.cs (6)
60.WithAnnotation(new TenantScopedResourceAnnotation(new Dictionary<string, string> 66.WithAnnotation(new TenantScopedResourceAnnotation(new Dictionary<string, string> 150directory.WithAnnotation(new TenantScopedResourceAnnotation(new Dictionary<string, string> 227directory.WithAnnotation(new TenantScopedResourceAnnotation(new Dictionary<string, string>())); 258registration.WithAnnotation(new TenantScopedResourceAnnotation(new Dictionary<string, string>())); 296.WithAnnotation(new TenantScopedResourceAnnotation(new Dictionary<string, string>()));
AzureManagedRedisExtensionsTests.cs (3)
120cache.WithAnnotation(new Dummy1Annotation()); 125c.WithAnnotation(new Dummy2Annotation()); 130cache.WithAnnotation(new Dummy1Annotation());
AzurePostgresExtensionsTests.cs (6)
271postgres.WithAnnotation(new Dummy1Annotation()); 272db?.WithAnnotation(new Dummy1Annotation()); 277c.WithAnnotation(new Dummy2Annotation()); 287db!.WithAnnotation(new Dummy1Annotation()); 293postgres.WithAnnotation(new Dummy1Annotation()); 294db!.WithAnnotation(new Dummy1Annotation());
AzureRedisExtensionsTests.cs (3)
164cache.WithAnnotation(new Dummy1Annotation()); 169c.WithAnnotation(new Dummy2Annotation()); 174cache.WithAnnotation(new Dummy1Annotation());
AzureResourcePreparerTests.cs (2)
109first.WithAnnotation(new RoleAssignmentAnnotation(second.Resource, operatorRoles)); 110second.WithAnnotation(new RoleAssignmentAnnotation(first.Resource, operatorRoles));
AzureSandboxesTests.cs (3)
300.WithAnnotation(new AppIdentityAnnotation(computeIdentity.Resource)) 322.WithAnnotation(new AppIdentityAnnotation(identity.Resource)) 348.WithAnnotation(new AppIdentityAnnotation(identity.Resource))
AzureSqlExtensionsTests.cs (6)
191sql.WithAnnotation(new Dummy1Annotation()); 192db?.WithAnnotation(new Dummy1Annotation()); 197c.WithAnnotation(new Dummy2Annotation()); 207db!.WithAnnotation(new Dummy1Annotation()); 213sql.WithAnnotation(new Dummy1Annotation()); 214db!.WithAnnotation(new Dummy1Annotation());
AzureUserAssignedIdentityTests.cs (2)
107.WithAnnotation(new ManagedIdentityRequiredAnnotation()); 126.WithAnnotation(new ManagedIdentityRequiredAnnotation());
AzureVirtualNetworkExtensionsTests.cs (6)
118.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("ContainerAppsDelegation", "Microsoft.App/environments")); 238.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("First", "Microsoft.Sql/managedInstances")) 239.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("Second", "Microsoft.NetApp/volumes")); 318.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("AppServiceDelegation", "microsoft.web/serverfarms")); 335.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("ContainerApps", "Microsoft.App/environments")) 336.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("AppService", "microsoft.web/serverfarms"));
Aspire.Hosting.Azure.WebPubSub (4)
AzureWebPubSubExtensions.cs (2)
191builder.WithAnnotation(new EmulatorResourceAnnotation()) 193.WithAnnotation(new ContainerImageAnnotation
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Aspire.Hosting.Blazor (4)
BlazorGatewayExtensions.cs (4)
143.WithAnnotation(new ForceProcessExecutionAnnotation()) 164.WithAnnotation(new ExecutableAnnotation 169.WithAnnotation(new ProjectLaunchArgsOverrideAnnotation(["run"])); 658gateway.WithAnnotation(new ContainerFilesDestinationAnnotation
Aspire.Hosting.CodeGeneration.Go.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
136return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.CodeGeneration.Java.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
136return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.CodeGeneration.Python.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
136return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
136return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
TestTypes\TestExtensions.cs (1)
136return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.Docker (1)
DockerComposeServiceExtensions.cs (1)
48return builder.WithAnnotation(new DockerComposeServiceCustomizationAnnotation(configure));
Aspire.Hosting.Docker.Tests (1)
DockerComposeTests.cs (1)
142.WithAnnotation(new DockerComposeServiceCustomizationAnnotation((_, _) => { }));
Aspire.Hosting.Dotnet (3)
DotnetProjectBuildCoordinator.cs (1)
84resourceBuilder.WithAnnotation(new DotnetProgramBuildCompletionAnnotation(
DotnetProjectHostingExtensions.cs (2)
180builder.WithAnnotation(new DotnetProjectBuildEnvironmentCallbackAnnotation(callback)); 392.WithAnnotation(projectMetadata)
Aspire.Hosting.Dotnet.Tests (6)
DotnetProjectBuildCoordinatorTests.cs (3)
3370var resourceBuilder = builder.AddResource(resource).WithAnnotation(metadata); 3394var removedBuilder = builder.AddResource(removedResource).WithAnnotation(removedMetadata); 3401var activeBuilder = builder.AddResource(activeResource).WithAnnotation(activeMetadata);
DotnetProjectResourceTests.cs (2)
303.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/sentinel.txt" }); 310.WithAnnotation(new ContainerFilesDestinationAnnotation
WslcDotnetPublishingTests.cs (1)
56.WithAnnotation(new ContainerFilesDestinationAnnotation { Source = source.Resource, DestinationPath = "wwwroot" })
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
749toolBuilder.WithAnnotation(callback);
Aspire.Hosting.EntityFrameworkCore.Tests (7)
EFBuildCustomizationWarningTests.cs (1)
42.WithAnnotation(new CustomBuildProjectMetadata { ProjectPath = startupPath })
EFBuildReadinessTests.cs (6)
29.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, cancellationToken) => 62.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, cancellationToken) => 95.WithAnnotation(new CustomBuildProjectMetadata { ProjectPath = projectPath }) 130.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, _) => 170.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, token) => completion.Task.WaitAsync(token))); 203.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, token) => completion.WaitAsync(token)));
Aspire.Hosting.Foundry (3)
src\Shared\AzureRoleAssignmentUtils.cs (2)
15return builder.WithAnnotation(new RoleAssignmentAnnotation(target.Resource, CreateRoleDefinitions(roles, getName))); 22return builder.WithAnnotation(new DefaultRoleAssignmentsAnnotation(CreateRoleDefinitions(roles, getName)));
Toolbox\FoundryToolboxBuilderExtensions.cs (1)
368builder.WithAnnotation(new FoundryToolboxExistingResourceAnnotation());
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
311return builder.WithAnnotation(new PersistenceAnnotation(interval), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Go (15)
GoHostingExtensions.cs (15)
292rb.WithAnnotation(new GoPackagePathAnnotation(packagePath), ResourceAnnotationMutationBehavior.Replace); 297rb.WithAnnotation(new GoBuildTagsAnnotation(buildTags), ResourceAnnotationMutationBehavior.Replace); 302rb.WithAnnotation(new GoLdFlagsAnnotation(ldFlags), ResourceAnnotationMutationBehavior.Replace); 307rb.WithAnnotation(new GoGcFlagsAnnotation(gcFlags), ResourceAnnotationMutationBehavior.Replace); 312rb.WithAnnotation(new GoRaceDetectorAnnotation(), ResourceAnnotationMutationBehavior.Replace); 357return builder.WithAnnotation(new GoAppArgsAnnotation(args), ResourceAnnotationMutationBehavior.Replace); 380builder.WithAnnotation(new GoModTidyAnnotation()); 396builder.WithAnnotation(new GoModTidyBuilderAnnotation(tidy)); 432builder.WithAnnotation(new GoModVendorAnnotation()); 452builder.WithAnnotation(new GoModVendorBuilderAnnotation(vendor)); 479builder.WithAnnotation(new GoModDownloadAnnotation()); 528builder.WithAnnotation(new GoVetToolAnnotation()); 605return builder.WithAnnotation( 731.WithAnnotation( 734.WithAnnotation(
Aspire.Hosting.Go.Tests (4)
AddGoAppTests.cs (4)
1314.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 1345.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 1378.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 1384.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/public" });
Aspire.Hosting.Java (13)
JavaHostingExtensions.cs (13)
196rb.WithAnnotation( 412.WithAnnotation(new JavaQuarkusAnnotation(), ResourceAnnotationMutationBehavior.Replace) 550builder.WithAnnotation( 570builder.WithAnnotation( 577builder.WithAnnotation( 709builder.WithAnnotation( 828builder.WithAnnotation( 925builder.WithAnnotation( 955builder.WithAnnotation(new WrapperAnnotation(resolvedWrapperPath), ResourceAnnotationMutationBehavior.Replace); 1008return builder.WithAnnotation(new JavaMainClassAnnotation(mainClass), ResourceAnnotationMutationBehavior.Replace); 1039return builder.WithAnnotation(new JavaJarArtifactAnnotation(jarPath), ResourceAnnotationMutationBehavior.Replace); 1216builder.WithAnnotation(new JavaOtelAgentAnnotation(agentPath), ResourceAnnotationMutationBehavior.Replace); 1571builder.WithAnnotation(new JavaWrapperValidationAnnotation(tool));
Aspire.Hosting.JavaScript (22)
DenoHostingExtensions.cs (2)
33builder.WithAnnotation(annotation); 442builder.WithAnnotation(environmentCallback);
JavaScriptHostingExtensions.cs (20)
1351builder.WithAnnotation(annotation) 1413builder.WithAnnotation(annotation) 1494builder.WithAnnotation(annotation) 1897.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" }) 2240.WithAnnotation(new JavaScriptPublishModeAnnotation(JavaScriptPublishMode.NextStandalone)) 2333.WithAnnotation(new JavaScriptPackageManagerAnnotation("npm", runScriptCommand: "run", cacheMount: "/root/.npm") 2337.WithAnnotation(new JavaScriptInstallCommandAnnotation([installCommand, .. installArgs ?? []]) 2396.WithAnnotation(new JavaScriptPackageManagerAnnotation("bun", runScriptCommand: "run", cacheMount: "/root/.bun/install/cache") 2404.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs]) 2413resource.WithAnnotation(new DockerfileBaseImageAnnotation 2498.WithAnnotation(packageManager) 2499.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs])); 2505resource.WithAnnotation(new DockerfileBaseImageAnnotation 2584.WithAnnotation(packageManager) 2585.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs]) 2661.WithAnnotation(new JavaScriptPackageManagerAnnotation("pnpm", runScriptCommand: "run", cacheMount: "/pnpm/store") 2670.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs]) 2768return resource.WithAnnotation(new JavaScriptBuildScriptAnnotation(scriptName, args)); 2787return resource.WithAnnotation(new JavaScriptRunScriptAnnotation(scriptName, args)); 3057resource.WithAnnotation(new JavaScriptPackageInstallerAnnotation(installer));
Aspire.Hosting.JavaScript.Tests (4)
AddNodeAppTests.cs (4)
172.WithAnnotation(new JavaScriptPackageManagerAnnotation("mypm", runScriptCommand: null, cacheMount: null) 176.WithAnnotation(new JavaScriptInstallCommandAnnotation(["myinstall"])) 354.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" }); 411.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" });
Aspire.Hosting.Keycloak.Tests (1)
KeycloakResourceBuilderTests.cs (1)
72keycloak.WithAnnotation(new HttpsCertificateAnnotation
Aspire.Hosting.Kubernetes (22)
CertManagerExtensions.cs (2)
132resourceBuilder.WithAnnotation(new PipelineStepAnnotation(_ => 134resourceBuilder.WithAnnotation(new PipelineStepAnnotation(_ =>
HelmChartOptions.cs (10)
47EnvironmentBuilder.WithAnnotation(new KubernetesNamespaceAnnotation(expression), ResourceAnnotationMutationBehavior.Replace); 62EnvironmentBuilder.WithAnnotation(new KubernetesNamespaceAnnotation(expression), ResourceAnnotationMutationBehavior.Replace); 94EnvironmentBuilder.WithAnnotation(new HelmReleaseNameAnnotation(expression), ResourceAnnotationMutationBehavior.Replace); 109EnvironmentBuilder.WithAnnotation(new HelmReleaseNameAnnotation(expression), ResourceAnnotationMutationBehavior.Replace); 146EnvironmentBuilder.WithAnnotation(new HelmChartVersionAnnotation(expression), ResourceAnnotationMutationBehavior.Replace); 161EnvironmentBuilder.WithAnnotation(new HelmChartVersionAnnotation(expression), ResourceAnnotationMutationBehavior.Replace); 193EnvironmentBuilder.WithAnnotation(new HelmChartNameAnnotation(expression), ResourceAnnotationMutationBehavior.Replace); 208EnvironmentBuilder.WithAnnotation(new HelmChartNameAnnotation(expression), ResourceAnnotationMutationBehavior.Replace); 240EnvironmentBuilder.WithAnnotation(new HelmChartDescriptionAnnotation(expression), ResourceAnnotationMutationBehavior.Replace); 255EnvironmentBuilder.WithAnnotation(new HelmChartDescriptionAnnotation(expression), ResourceAnnotationMutationBehavior.Replace);
KubernetesEnvironmentExtensions.cs (1)
525builder.WithAnnotation(new KubernetesNodePoolAnnotation(nodePool.Resource));
KubernetesHelmChartExtensions.cs (1)
86chartBuilder.WithAnnotation(new PipelineStepAnnotation(_ =>
KubernetesPersistentVolumeExtensions.cs (7)
309builder.WithAnnotation(new KubernetesPersistentVolumeCustomizationAnnotation(configure)); 357builder.WithAnnotation(new VolumeMountBindingAnnotation(volume.Resource.Name) 372builder.WithAnnotation(new KubernetesPersistentVolumeBindingAnnotation( 530builder.WithAnnotation(new ContainerMountAnnotation( 536builder.WithAnnotation(binding); 540builder.WithAnnotation(new EnvironmentCallbackAnnotation(context => 546builder.WithAnnotation(new KubernetesPersistentVolumeBindingAnnotation(
KubernetesServiceExtensions.cs (1)
47return builder.WithAnnotation(new KubernetesServiceCustomizationAnnotation(configure));
Aspire.Hosting.Kubernetes.Tests (1)
KubernetesEnvironmentResourceTests.cs (1)
84.WithAnnotation(new KubernetesServiceCustomizationAnnotation((_) => { }));
Aspire.Hosting.Maui (19)
MauiAndroidExtensions.cs (6)
161.WithAnnotation(new MauiProjectMetadata(projectPath)) 162.WithAnnotation(new MauiAndroidEnvironmentAnnotation()) // Enable environment variable support via targets file 163.WithAnnotation(new ExecutableAnnotation 366.WithAnnotation(new MauiProjectMetadata(projectPath)) 367.WithAnnotation(new MauiAndroidEnvironmentAnnotation()) // Enable environment variable support via targets file 368.WithAnnotation(new ExecutableAnnotation
MauiiOSExtensions.cs (6)
168.WithAnnotation(new MauiProjectMetadata(projectPath)) 169.WithAnnotation(new MauiiOSEnvironmentAnnotation()) // Enable environment variable support via targets file 170.WithAnnotation(new ExecutableAnnotation 379.WithAnnotation(new MauiProjectMetadata(projectPath)) 380.WithAnnotation(new MauiiOSEnvironmentAnnotation()) // Enable environment variable support via targets file 381.WithAnnotation(new ExecutableAnnotation
MauiMacCatalystExtensions.cs (2)
92.WithAnnotation(new MauiProjectMetadata(projectPath)) 93.WithAnnotation(new ExecutableAnnotation
MauiPlatformHelper.cs (3)
102resourceBuilder.WithAnnotation(new ProjectLaunchArgsOverrideAnnotation(launchOverrideArgs, leadingResourceArgumentToRemove: "run")); 110resourceBuilder.WithAnnotation(new MauiBuildInfoAnnotation( 165resourceBuilder.WithAnnotation(new UnsupportedPlatformAnnotation(reason), ResourceAnnotationMutationBehavior.Append);
MauiWindowsExtensions.cs (2)
92.WithAnnotation(new MauiProjectMetadata(projectPath)) 93.WithAnnotation(new ExecutableAnnotation
Aspire.Hosting.MongoDB (7)
MongoDBBuilderExtensions.cs (6)
475.WithAnnotation(new MongoDBServerBindAllIpAnnotation()) 542.WithAnnotation(annotation) 561.WithAnnotation(new MongoDBServerReplicaSetAnnotation(name)) 616.WithAnnotation(new MongoDBServerKeyFileAnnotation(keyValue, keyFilePath)) 675return builder.WithAnnotation(new MongoDBServerTlsModeAnnotation(mode), ResourceAnnotationMutationBehavior.Replace); 710return builder.WithAnnotation(new MongoDBServerTlsAllowInvalidCertificatesAnnotation(), ResourceAnnotationMutationBehavior.Replace);
ReplicaSet\MongoDBReplicaSetBuilderExtensions.cs (1)
525.WithAnnotation(new MongoReplicaSetMemberAnnotation(member.Resource))
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
257builder.WithAnnotation(new MySqlCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.Orleans (1)
OrleansServiceExtensions.cs (1)
392return builder.WithAnnotation(new OrleansProviderTypeAnnotation(providerType), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
629builder.WithAnnotation(new PostgresCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.Python (9)
PythonAppResourceBuilderExtensions.cs (9)
367.WithAnnotation(new PythonEntrypointAnnotation 989builder.WithAnnotation(new PythonExecutableDebuggableAnnotation()); 1120builder.WithAnnotation(new PythonEntrypointAnnotation 1233.WithAnnotation(new PythonPackageManagerAnnotation(virtualEnvironment.GetExecutable("pip")), ResourceAnnotationMutationBehavior.Replace) 1234.WithAnnotation(new PythonInstallCommandAnnotation([.. baseInstallArgs, .. installArgs ?? []]), ResourceAnnotationMutationBehavior.Replace); 1302.WithAnnotation(new PythonPackageManagerAnnotation("uv"), ResourceAnnotationMutationBehavior.Replace) 1303.WithAnnotation(new PythonInstallCommandAnnotation(args), ResourceAnnotationMutationBehavior.Replace); 1417builder.WithAnnotation(new PythonPackageInstallerAnnotation(installer)); 1592builder.WithAnnotation(existing);
Aspire.Hosting.Python.Tests (1)
AddUvicornAppTests.cs (1)
77.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" });
Aspire.Hosting.Radius (1)
Secrets\RadiusSecretStoreExtensions.cs (1)
78storeBuilder.WithAnnotation(new PipelineStepAnnotation(_ => new PipelineStep
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
611return builder.WithAnnotation( 654return builder.WithAnnotation(new RedisModuleAnnotation(path));
Aspire.Hosting.Rust (4)
RustHostingExtensions.cs (4)
242return builder.WithAnnotation(annotation); 486builder.WithAnnotation(options); 750containerBuilder.WithAnnotation( 761containerBuilder.WithAnnotation(
Aspire.Hosting.Rust.Tests (3)
AddRustAppPublishTests.cs (3)
282.PublishAsDockerFile(container => container.WithAnnotation( 306.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 309.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/public" });
Aspire.Hosting.SqlServer (1)
SqlServerBuilderExtensions.cs (1)
332builder.WithAnnotation(new SqlServerCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.Tests (164)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (11)
125resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 846.WithAnnotation(new McpServerEndpointAnnotation((resource, cancellationToken) => 1464resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1503resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1542resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1576resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1611resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 2034resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 2040otherResource.WithAnnotation(new DcpInstancesAnnotation([ 2094resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 2834resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([
BuildOnlyContainerValidationTests.cs (2)
96.WithAnnotation(new DockerfileBuildAnnotation("context", "Dockerfile", null) { HasEntrypoint = false }) 97.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" });
Dcp\DcpExecutorTests.cs (29)
385.WithAnnotation(new ReplicaAnnotation(3)); 1550.WithAnnotation(new ContainerImageAnnotation { Image = "image" }) 1551.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = ContainerLifetime.Persistent }) 6108.WithAnnotation(new ExecutableAnnotation 6185.WithAnnotation(new ExecutableAnnotation 6567.WithAnnotation(new ReplicaAnnotation(2)) 7858.WithAnnotation(new ExecutableAnnotation 7918.WithAnnotation(new ExecutableAnnotation 7970.WithAnnotation(new ExecutableAnnotation 8014.WithAnnotation(new ExecutableAnnotation 8447.WithAnnotation(new ExecutableAnnotation 8562.WithAnnotation(new ExecutableAnnotation 8622.WithAnnotation(new ExecutableAnnotation 8665.WithAnnotation(new ExecutableAnnotation 9057.WithAnnotation(new TestFileBasedProject(projectPath)); 9103.WithAnnotation(new TestFileBasedProject(projectPath)); 9400.WithAnnotation(new ExecutableAnnotation 9704.WithAnnotation(new TestProjectWithLaunchSettings()) 9705.WithAnnotation(new LaunchProfileAnnotation("http")) 9769.WithAnnotation(new TestProjectWithLaunchSettings()) 9799.WithAnnotation(new TestProjectWithLaunchSettings()) 9832.WithAnnotation(new TestProjectWithLaunchSettings()) 10295.WithAnnotation(new TestProjectWithLaunchSettings()) 10330.WithAnnotation(new TestProjectWithLaunchSettings()) 10398.WithAnnotation(new TestProjectWithLaunchSettings()) 10648.WithAnnotation(new TestProjectWithLaunchSettings()) 10649.WithAnnotation(new LaunchProfileAnnotation("http")) 12194.WithAnnotation(new ReplicaAnnotation(2)) 12195.WithAnnotation(new DcpInstancesAnnotation(
DebugSupportExtensionsTests.cs (1)
534.WithAnnotation(new ForceProcessExecutionAnnotation());
DotnetProgramPublishingTests.cs (20)
94.WithAnnotation(new TestProjectMetadata("program.csproj")); 112.WithAnnotation(new TestProjectMetadata("program.csproj")); 155.WithAnnotation(new TestProjectMetadata(projectPath)) 177.WithAnnotation(new TestProjectMetadata("program.csproj")) 199.WithAnnotation(new TestProjectMetadata("program.csproj")) 201.WithAnnotation(new ContainerImageAnnotation 250.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 252.WithAnnotation(new TestProjectMetadata("program.csproj")) 254.WithAnnotation(new ContainerImageAnnotation 260.WithAnnotation(new ContainerFilesDestinationAnnotation 322resource.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 324.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(context => 333.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 334resource.WithAnnotation(new ContainerFilesDestinationAnnotation 380.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "local.csproj"))); 382.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "archive.csproj"))) 411.WithAnnotation(new TestProjectMetadata("program.csproj")); 439.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 442.WithAnnotation(metadata) 443.WithAnnotation(new ContainerFilesDestinationAnnotation
ExecutionConfigurationGathererTests.cs (6)
755.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 785.WithAnnotation(new HttpsCertificateAnnotation 816.WithAnnotation(new HttpsCertificateAnnotation 862.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 901.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 902.WithAnnotation(new HttpsCertificateConfigurationCallbackAnnotation(ctx =>
ExpressionResolverTests.cs (2)
216.WithAnnotation(nonHostEndpoint); 293.WithAnnotation(endpoint);
ManifestGenerationTests.cs (9)
562.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 566.WithAnnotation(new ContainerFilesDestinationAnnotation 604.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 605.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 609.WithAnnotation(new ContainerFilesDestinationAnnotation 648.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 651.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 655.WithAnnotation(new ContainerFilesDestinationAnnotation 660.WithAnnotation(new ContainerFilesDestinationAnnotation
Pipelines\DistributedApplicationPipelineTests.cs (1)
2318.WithAnnotation(new PipelineStepAnnotation(_ => materialized
ProjectResourceBuilderExtensionTests.cs (8)
104.WithAnnotation<IProjectMetadata>(new TestProject()) 116.WithAnnotation<IProjectMetadata>(new TestProject()) 117.WithAnnotation<IProjectMetadata>(new OverrideTestProject()); 135project.WithAnnotation<IProjectMetadata>(new OverrideTestProject(), mutationBehavior); 233.WithAnnotation<IProjectMetadata>(new TestProject()) 321.WithAnnotation<IProjectMetadata>(new TestProject()) 406.WithAnnotation<IProjectMetadata>(new TestProject()) 446.WithAnnotation<IProjectMetadata>(new TestProject())
ProjectResourceTests.cs (3)
913.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 949.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 1010.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" });
Publishing\DotnetProgramArchiveTests.cs (2)
380.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 384.WithAnnotation(new ContainerFilesDestinationAnnotation
Publishing\ResourceContainerImageManagerTests.cs (27)
784.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj"))) 815.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 848.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj"))) 895.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 935.WithAnnotation(new TestProjectMetadata(projectPath)) 986.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 991.WithAnnotation(new TestProjectMetadata(projectPath)) 992.WithAnnotation(new ContainerFilesDestinationAnnotation 1075.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 1079.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 1080.WithAnnotation(new ContainerFilesDestinationAnnotation 1127.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs"))) 1170.WithAnnotation(new TestProjectMetadata(projectPath)) 1207.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 1210.WithAnnotation(new TestProjectMetadata(projectPath)) 1211.WithAnnotation(new ContainerFilesDestinationAnnotation 1268.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 1271.WithAnnotation(new TestProjectMetadata(projectPath)) 1272.WithAnnotation(new ContainerFilesDestinationAnnotation 1400.WithAnnotation(new TestProjectMetadata(projectPath)) 1793.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1799.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1832.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1839.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1972.WithAnnotation(dockerfileBuildAnnotation); 1983container.WithAnnotation(defaultContainerBuildOptions); 2011.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(async ctx =>
ResourceCommandServiceTests.cs (10)
56custom.WithAnnotation(new DcpInstancesAnnotation([ 97custom.WithAnnotation(new DcpInstancesAnnotation([ 116custom.WithAnnotation(new DcpInstancesAnnotation([ 120custom.WithAnnotation(new ReplicaAnnotation(2)); 141custom.WithAnnotation(new DcpInstancesAnnotation([ 178custom.WithAnnotation(new DcpInstancesAnnotation([ 218custom.WithAnnotation(new DcpInstancesAnnotation([ 283custom.WithAnnotation(new DcpInstancesAnnotation([ 314custom.WithAnnotation(new DcpInstancesAnnotation([ 1716custom.WithAnnotation(new DcpInstancesAnnotation([
ResourceDependencyTests.cs (1)
86.WithAnnotation(nonHostEndpoint);
ResourceExtensionsTests.cs (17)
53.WithAnnotation(new AnotherDummyAnnotation()); 65.WithAnnotation(new DummyAnnotation()); 77.WithAnnotation(new DummyAnnotation()); 100.WithAnnotation(new AnotherDummyAnnotation()); 112.WithAnnotation(new AnotherDummyAnnotation()); 115.WithAnnotation(new AnotherDummyAnnotation()); 127.WithAnnotation(new DummyAnnotation()); 141.WithAnnotation(new DummyAnnotation()); 144.WithAnnotation(new DummyAnnotation()); 156.WithAnnotation(new DummyAnnotation()); 159.WithAnnotation(new DummyAnnotation()); 162.WithAnnotation(new DummyAnnotation()); 178.WithAnnotation(new DeploymentTargetAnnotation(deploymentTarget.Resource) 615resource.WithAnnotation(new DcpInstancesAnnotation([])); 629.WithAnnotation(new DcpInstancesAnnotation([ 652resource.WithAnnotation(new DcpInstancesAnnotation([])); 665.WithAnnotation(new DcpInstancesAnnotation([
Terminals\ResourceTerminalCatalogTests.cs (2)
72builder.AddExecutable("myapp", "myapp", ".").WithAnnotation(new ReplicaAnnotation(3)).WithTerminal(); 103builder.AddExecutable("myapp", "myapp", ".").WithAnnotation(new ReplicaAnnotation(2)).WithTerminal();
Utils\WithAnnotationTests.cs (2)
28.WithAnnotation<DummyAnnotation>(new DummyAnnotation()) 29.WithAnnotation<DummyAnnotation>(new DummyAnnotation());
WaitForTests.cs (4)
639.WithAnnotation(new ReplicaAnnotation(2)) 640.WithAnnotation(new DcpInstancesAnnotation([ 692.WithAnnotation(new ReplicaAnnotation(2)) 693.WithAnnotation(new DcpInstancesAnnotation([
WithTerminalTests.cs (7)
321.WithAnnotation(new ReplicaAnnotation(2)); 347.WithAnnotation(new ReplicaAnnotation(2)) 405.WithAnnotation(new ReplicaAnnotation(2)) 1230.WithAnnotation(new ReplicaAnnotation(3)); 1262resource.WithAnnotation(new ReplicaAnnotation(3)); 1281.WithAnnotation(new ReplicaAnnotation(2)); 1354.WithAnnotation(new ReplicaAnnotation(2));
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
346return builder.WithAnnotation(
Aspire.Hosting.Yarp.Tests (10)
AddYarpTests.cs (10)
255.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 273.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 300.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 330.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 362.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 363.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 393.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 394.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 398.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist2" }) 399.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets2" });
ProjectResourceExtensions.AppHost (2)
AppHost.cs (2)
62.WithAnnotation(new FakeProjectMetadata(projectPath)) 63.WithAnnotation(new LaunchProfileAnnotation(launchProfileName));