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)
731public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
Aspire.Hosting.RemoteHost.Tests (1)
CapabilityDispatcherTests.cs (1)
2844public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
610 references to WithAnnotation
Aspire.Hosting (111)
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 => 325return builder.WithAnnotation(annotation); 554return builder.WithAnnotation(annotation); 588.WithAnnotation(new PersistenceAnnotation 597.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace); 613return builder.WithAnnotation(new ContainerImagePullPolicyAnnotation { ImagePullPolicy = pullPolicy }, ResourceAnnotationMutationBehavior.Replace); 721return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 722.WithAnnotation(defaultContainerBuildOptions) 726return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 727.WithAnnotation(defaultContainerBuildOptions) 871return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 872.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 876return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 877.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 1113return builder.WithAnnotation(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace); 1314return builder.WithAnnotation(new ContainerCertificatePathsAnnotation 1406return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1478return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1521return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1729builder.WithAnnotation(callbackAnnotation); 1865return builder.WithAnnotation(new DockerfileBaseImageAnnotation 1893return 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)
303.WithAnnotation(projectMetadata) 353.WithAnnotation(new ProjectMetadata(projectPath)) 457.WithAnnotation(projectMetadata) 544builder.WithAnnotation(launchDefaults); 698builder.WithAnnotation(new ExcludeLaunchProfileAnnotation()); 702builder.WithAnnotation(new LaunchProfileAnnotation(options.LaunchProfileName)); 710builder.WithAnnotation(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName)); 978builder.WithAnnotation(new ReplicaAnnotation(replicas)); 1164.WithAnnotation(new ExplicitStartupAnnotation()) 1165.WithAnnotation(new ExcludeLifecycleCommandsAnnotation())
RequiredCommandResourceExtensions.cs (2)
38builder.WithAnnotation(new RequiredCommandAnnotation(command) 75builder.WithAnnotation(new RequiredCommandAnnotation(command)
ResourceBuilderExtensions.cs (55)
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()); 2296return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(callback)); 2320return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(callback)); 2376return builder.WithAnnotation(new ResourceUrlAnnotation { Url = url, DisplayText = displayText }); 2443return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(async c => 2643return builder.WithAnnotation(new ContainerFilesDestinationAnnotation() 2666return builder.WithAnnotation(new ContainerFilesSourceAnnotation() 2704return builder.WithAnnotation(ManifestPublishingCallbackAnnotation.Ignore); 2831return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilHealthy) { WaitBehavior = waitBehavior }); 2964return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilStarted) { WaitBehavior = waitBehavior }); 2994return builder.WithAnnotation(new ExplicitStartupAnnotation()); 3043return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitForCompletion, exitCode)); 3096builder.WithAnnotation(new HealthCheckAnnotation(key)); 3306return 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)); 3372return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted)); 4382return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4433return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4484return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4521return builder.WithAnnotation(new CertificateTrustConfigurationCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 4593return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4629return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4661return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 4695return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 4857builder.WithAnnotation(new ResourceRelationshipAnnotation(resource, type)); 4899return builder.WithAnnotation(new ResourceRelationshipAnnotation(resource, KnownRelationshipTypes.Reference)); 4979return builder.WithAnnotation(new ResourceRelationshipAnnotation(resourceBuilder.Resource, KnownRelationshipTypes.Reference)); 5152return builder.WithAnnotation(new ResourceIconAnnotation(iconName, iconVariant), ResourceAnnotationMutationBehavior.Replace); 5172builder.WithAnnotation(new ComputeEnvironmentAnnotation(computeEnvironmentResource.Resource)); 5283return builder.WithAnnotation(new LaunchToolArgsCallbackAnnotation( 5422return builder.WithAnnotation(SupportsDebuggingAnnotation.Create( 5596return builder.WithAnnotation(probeAnnotation); 5611return builder.WithAnnotation(new ExcludeFromMcpAnnotation()); 5631return builder.WithAnnotation(new HiddenAnnotation(HiddenBehavior.Always), ResourceAnnotationMutationBehavior.Replace); 5651return builder.WithAnnotation(new HiddenAnnotation(HiddenBehavior.OnCompletion) { SuccessfulExitCodes = [exitCode] }, ResourceAnnotationMutationBehavior.Replace); 5702return builder.WithAnnotation(new HiddenAnnotation(HiddenBehavior.OnCompletion) { SuccessfulExitCodes = exitCodes.Count > 0 ? [.. exitCodes] : [0] }, ResourceAnnotationMutationBehavior.Replace); 5740return builder.WithAnnotation(new ContainerImagePushOptionsCallbackAnnotation(callback)); 5781return builder.WithAnnotation(new ContainerImagePushOptionsCallbackAnnotation(callback));
ResourceTraitBuilderExtensions.cs (1)
34return builder.WithAnnotation(annotation);
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.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)
1137builder.WithAnnotation(new AzureLogAnalyticsWorkspaceReferenceAnnotation(workspaceBuilder.Resource)); 1194builder.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 (3)
EntraIdProvisioningTests.cs (3)
288web.WithAnnotation(new AppIdentityAnnotation(identity.Resource)); 1161.WithAnnotation(customization); 1278.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)
130frontDoor.WithAnnotation(new AzureFrontDoorPrivateLinkAnnotation(frontDoor.Resource, environment.Resource)); 134environment.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, 155controlPlaneIdentity.WithAnnotation(new RoleAssignmentAnnotation((AzureProvisioningResource)network, 179k8sEnvBuilder.WithAnnotation(new PipelineConfigurationAnnotation(context => 428builder.WithAnnotation(new AksSubnetAnnotation(subnet.Resource.Id), ResourceAnnotationMutationBehavior.Replace); 464builder.WithAnnotation(new AksSubnetAnnotation(subnet.Resource.Id)); 503builder.WithAnnotation(
Aspire.Hosting.Azure.Kubernetes.Tests (3)
AzureKubernetesEnvironmentExtensionsTests.cs (3)
790builder.AddAzureKubernetesEnvironment("aks").WithAnnotation(ManifestPublishingCallbackAnnotation.Ignore); 1318.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("First", "Microsoft.Netapp/volumes")) 1319.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("Second", "Microsoft.Sql/managedInstances"));
Aspire.Hosting.Azure.Kusto (6)
AzureKustoBuilderExtensions.cs (4)
98.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>())); 169builder.WithAnnotation(new EmulatorResourceAnnotation()); 178.WithAnnotation(new ContainerImageAnnotation 208builder.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 (2)
AzureVirtualNetworkExtensions.cs (2)
342builder.WithAnnotation( 405return 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)
557.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)
268.WithAnnotation(new AppIdentityAnnotation(computeIdentity.Resource)) 290.WithAnnotation(new AppIdentityAnnotation(identity.Resource)) 316.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)
142.WithAnnotation(new ForceProcessExecutionAnnotation()) 163.WithAnnotation(new ExecutableAnnotation 168.WithAnnotation(new ProjectLaunchArgsOverrideAnnotation(["run"])); 655gateway.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)
140.WithAnnotation(new DockerComposeServiceCustomizationAnnotation((_, _) => { }));
Aspire.Hosting.Dotnet (3)
DotnetProjectBuildCoordinator.cs (1)
67resourceBuilder.WithAnnotation(new DotnetProgramBuildCompletionAnnotation(
DotnetProjectHostingExtensions.cs (2)
164builder.WithAnnotation(new DotnetProjectBuildEnvironmentCallbackAnnotation(callback)); 376.WithAnnotation(projectMetadata)
Aspire.Hosting.Dotnet.Tests (5)
DotnetProjectBuildCoordinatorTests.cs (3)
2386var resourceBuilder = builder.AddResource(resource).WithAnnotation(metadata); 2410var removedBuilder = builder.AddResource(removedResource).WithAnnotation(removedMetadata); 2417var activeBuilder = builder.AddResource(activeResource).WithAnnotation(activeMetadata);
DotnetProjectResourceTests.cs (2)
302.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/sentinel.txt" }); 309.WithAnnotation(new ContainerFilesDestinationAnnotation
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
749toolBuilder.WithAnnotation(callback);
Aspire.Hosting.EntityFrameworkCore.Tests (6)
EFBuildCustomizationWarningTests.cs (1)
35.WithAnnotation(new CustomBuildProjectMetadata { ProjectPath = startupPath })
EFBuildReadinessTests.cs (5)
28.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, cancellationToken) => 61.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, cancellationToken) => 127.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, _) => 167.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, token) => completion.Task.WaitAsync(token))); 200.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)
309rb.WithAnnotation(new GoPackagePathAnnotation(packagePath), ResourceAnnotationMutationBehavior.Replace); 314rb.WithAnnotation(new GoBuildTagsAnnotation(buildTags), ResourceAnnotationMutationBehavior.Replace); 319rb.WithAnnotation(new GoLdFlagsAnnotation(ldFlags), ResourceAnnotationMutationBehavior.Replace); 324rb.WithAnnotation(new GoGcFlagsAnnotation(gcFlags), ResourceAnnotationMutationBehavior.Replace); 329rb.WithAnnotation(new GoRaceDetectorAnnotation(), ResourceAnnotationMutationBehavior.Replace); 401return builder.WithAnnotation(new GoAppArgsAnnotation(args), ResourceAnnotationMutationBehavior.Replace); 424builder.WithAnnotation(new GoModTidyAnnotation()); 438builder.WithAnnotation(new GoModTidyBuilderAnnotation(tidy)); 474builder.WithAnnotation(new GoModVendorAnnotation()); 493builder.WithAnnotation(new GoModVendorBuilderAnnotation(vendor)); 520builder.WithAnnotation(new GoModDownloadAnnotation()); 568builder.WithAnnotation(new GoVetToolAnnotation()); 644return builder.WithAnnotation( 770.WithAnnotation( 773.WithAnnotation(
Aspire.Hosting.Go.Tests (4)
AddGoAppTests.cs (4)
1242.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 1273.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 1306.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 1312.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); 1563builder.WithAnnotation(new JavaWrapperValidationAnnotation(tool));
Aspire.Hosting.JavaScript (24)
DenoHostingExtensions.cs (2)
33builder.WithAnnotation(annotation); 442builder.WithAnnotation(environmentCallback);
JavaScriptHostingExtensions.cs (22)
1351builder.WithAnnotation(annotation) 1413builder.WithAnnotation(annotation) 1494builder.WithAnnotation(annotation) 1897.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" }) 1914containerBuilder.WithAnnotation(new PipelineStepAnnotation(_ => new PipelineStep 2246.WithAnnotation(new JavaScriptPublishModeAnnotation(JavaScriptPublishMode.NextStandalone)) 2259resourceBuilder.WithAnnotation(new PipelineStepAnnotation(factoryCtx => 2346.WithAnnotation(new JavaScriptPackageManagerAnnotation("npm", runScriptCommand: "run", cacheMount: "/root/.npm") 2350.WithAnnotation(new JavaScriptInstallCommandAnnotation([installCommand, .. installArgs ?? []]) 2409.WithAnnotation(new JavaScriptPackageManagerAnnotation("bun", runScriptCommand: "run", cacheMount: "/root/.bun/install/cache") 2417.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs]) 2426resource.WithAnnotation(new DockerfileBaseImageAnnotation 2511.WithAnnotation(packageManager) 2512.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs])); 2518resource.WithAnnotation(new DockerfileBaseImageAnnotation 2597.WithAnnotation(packageManager) 2598.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs]) 2674.WithAnnotation(new JavaScriptPackageManagerAnnotation("pnpm", runScriptCommand: "run", cacheMount: "/pnpm/store") 2683.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs]) 2781return resource.WithAnnotation(new JavaScriptBuildScriptAnnotation(scriptName, args)); 2800return resource.WithAnnotation(new JavaScriptRunScriptAnnotation(scriptName, args)); 3070resource.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)
103resourceBuilder.WithAnnotation(new ProjectLaunchArgsOverrideAnnotation(launchOverrideArgs, leadingResourceArgumentToRemove: "run")); 111resourceBuilder.WithAnnotation(new MauiBuildInfoAnnotation( 166resourceBuilder.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)
544.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 1015builder.WithAnnotation(new PythonExecutableDebuggableAnnotation()); 1146builder.WithAnnotation(new PythonEntrypointAnnotation 1259.WithAnnotation(new PythonPackageManagerAnnotation(virtualEnvironment.GetExecutable("pip")), ResourceAnnotationMutationBehavior.Replace) 1260.WithAnnotation(new PythonInstallCommandAnnotation([.. baseInstallArgs, .. installArgs ?? []]), ResourceAnnotationMutationBehavior.Replace); 1328.WithAnnotation(new PythonPackageManagerAnnotation("uv"), ResourceAnnotationMutationBehavior.Replace) 1329.WithAnnotation(new PythonInstallCommandAnnotation(args), ResourceAnnotationMutationBehavior.Replace); 1443builder.WithAnnotation(new PythonPackageInstallerAnnotation(installer)); 1618builder.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)
607return builder.WithAnnotation( 650return 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 (162)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (11)
125resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 841.WithAnnotation(new McpServerEndpointAnnotation((resource, cancellationToken) => 1459resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1498resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1537resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1571resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1606resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 2029resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 2035otherResource.WithAnnotation(new DcpInstancesAnnotation([ 2089resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 2829resourceWithReplicas.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 (28)
383.WithAnnotation(new ReplicaAnnotation(3)); 1505.WithAnnotation(new ContainerImageAnnotation { Image = "image" }) 1506.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = ContainerLifetime.Persistent }) 5500.WithAnnotation(new ExecutableAnnotation 5880.WithAnnotation(new ReplicaAnnotation(2)) 6899.WithAnnotation(new ExecutableAnnotation 6959.WithAnnotation(new ExecutableAnnotation 7011.WithAnnotation(new ExecutableAnnotation 7055.WithAnnotation(new ExecutableAnnotation 7488.WithAnnotation(new ExecutableAnnotation 7603.WithAnnotation(new ExecutableAnnotation 7663.WithAnnotation(new ExecutableAnnotation 7706.WithAnnotation(new ExecutableAnnotation 8057.WithAnnotation(new TestFileBasedProject(projectPath)); 8103.WithAnnotation(new TestFileBasedProject(projectPath)); 8321.WithAnnotation(new ExecutableAnnotation 8625.WithAnnotation(new TestProjectWithLaunchSettings()) 8626.WithAnnotation(new LaunchProfileAnnotation("http")) 8690.WithAnnotation(new TestProjectWithLaunchSettings()) 8720.WithAnnotation(new TestProjectWithLaunchSettings()) 8753.WithAnnotation(new TestProjectWithLaunchSettings()) 9216.WithAnnotation(new TestProjectWithLaunchSettings()) 9251.WithAnnotation(new TestProjectWithLaunchSettings()) 9319.WithAnnotation(new TestProjectWithLaunchSettings()) 9569.WithAnnotation(new TestProjectWithLaunchSettings()) 9570.WithAnnotation(new LaunchProfileAnnotation("http")) 11102.WithAnnotation(new ReplicaAnnotation(2)) 11103.WithAnnotation(new DcpInstancesAnnotation(
DebugSupportExtensionsTests.cs (1)
459.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)
210.WithAnnotation(nonHostEndpoint); 287.WithAnnotation(endpoint);
ManifestGenerationTests.cs (9)
561.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 565.WithAnnotation(new ContainerFilesDestinationAnnotation 603.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 604.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 608.WithAnnotation(new ContainerFilesDestinationAnnotation 647.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 650.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 654.WithAnnotation(new ContainerFilesDestinationAnnotation 659.WithAnnotation(new ContainerFilesDestinationAnnotation
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)
890.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 926.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 987.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" });
Publishing\DotnetProgramArchiveTests.cs (2)
380.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 384.WithAnnotation(new ContainerFilesDestinationAnnotation
Publishing\ResourceContainerImageManagerTests.cs (27)
706.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj"))) 737.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 770.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj"))) 817.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 857.WithAnnotation(new TestProjectMetadata(projectPath)) 908.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 913.WithAnnotation(new TestProjectMetadata(projectPath)) 914.WithAnnotation(new ContainerFilesDestinationAnnotation 997.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 1001.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 1002.WithAnnotation(new ContainerFilesDestinationAnnotation 1049.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs"))) 1092.WithAnnotation(new TestProjectMetadata(projectPath)) 1129.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 1132.WithAnnotation(new TestProjectMetadata(projectPath)) 1133.WithAnnotation(new ContainerFilesDestinationAnnotation 1190.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 1193.WithAnnotation(new TestProjectMetadata(projectPath)) 1194.WithAnnotation(new ContainerFilesDestinationAnnotation 1277.WithAnnotation(new TestProjectMetadata(projectPath)) 1670.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1676.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1709.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1716.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1849.WithAnnotation(dockerfileBuildAnnotation); 1860container.WithAnnotation(defaultContainerBuildOptions); 1888.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(async ctx =>
ResourceCommandServiceTests.cs (10)
55custom.WithAnnotation(new DcpInstancesAnnotation([ 96custom.WithAnnotation(new DcpInstancesAnnotation([ 115custom.WithAnnotation(new DcpInstancesAnnotation([ 119custom.WithAnnotation(new ReplicaAnnotation(2)); 140custom.WithAnnotation(new DcpInstancesAnnotation([ 177custom.WithAnnotation(new DcpInstancesAnnotation([ 217custom.WithAnnotation(new DcpInstancesAnnotation([ 282custom.WithAnnotation(new DcpInstancesAnnotation([ 313custom.WithAnnotation(new DcpInstancesAnnotation([ 1714custom.WithAnnotation(new DcpInstancesAnnotation([
ResourceDependencyTests.cs (1)
84.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)
638.WithAnnotation(new ReplicaAnnotation(2)) 639.WithAnnotation(new DcpInstancesAnnotation([ 691.WithAnnotation(new ReplicaAnnotation(2)) 692.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));