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)
2650public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
585 references to WithAnnotation
Aspire.Hosting (110)
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)
277.WithAnnotation(projectMetadata) 322.WithAnnotation(new ProjectMetadata(projectPath)) 426.WithAnnotation(projectMetadata) 513builder.WithAnnotation(launchDefaults); 654builder.WithAnnotation(new ExcludeLaunchProfileAnnotation()); 658builder.WithAnnotation(new LaunchProfileAnnotation(options.LaunchProfileName)); 666builder.WithAnnotation(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName)); 933builder.WithAnnotation(new ReplicaAnnotation(replicas)); 1118.WithAnnotation(new ExplicitStartupAnnotation()) 1119.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));
TerminalResourceBuilderExtensions.cs (2)
91builder.WithAnnotation(annotation); 96builder.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)
702builder.WithAnnotation(CreateExistingAzureResourceAnnotation(name, resourceGroup, subscription, isTenantScope)); 715builder.WithAnnotation(CreateExistingAzureResourceAnnotation(name, resourceGroup, subscription, isTenantScope)); 726builder.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)
1097builder.WithAnnotation(new AzureLogAnalyticsWorkspaceReferenceAnnotation(workspaceBuilder.Resource)); 1154builder.WithAnnotation(new AzureContainerAppEnvironmentAcrPullIdentityAnnotation(identityBuilder.Resource));
AzureContainerAppProjectExtensions.cs (1)
49project.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.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 (1)
AzureFrontDoorExtensions.cs (1)
203return builder.WithAnnotation(new AzureFrontDoorOriginAnnotation(resource.Resource));
Aspire.Hosting.Azure.Functions (11)
AzureFunctionsProjectResourceExtensions.cs (3)
191.WithAnnotation(projectMetadata) 192.WithAnnotation(new AzureFunctionsAnnotation()) 208functionsBuilder.WithAnnotation(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName));
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 (5)
AzureKubernetesEnvironmentExtensions.cs (5)
93k8sEnvBuilder.WithAnnotation(new ContainerRegistryReferenceAnnotation(defaultRegistry.Resource)); 109k8sEnvBuilder.WithAnnotation(new PipelineConfigurationAnnotation(context => 262builder.WithAnnotation(new AksSubnetAnnotation(subnet.Resource.Id), ResourceAnnotationMutationBehavior.Replace); 298builder.WithAnnotation(new AksSubnetAnnotation(subnet.Resource.Id)); 337builder.WithAnnotation(
Aspire.Hosting.Azure.Kubernetes.Tests (2)
AzureKubernetesEnvironmentExtensionsTests.cs (2)
683.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("First", "Microsoft.Netapp/volumes")) 684.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)
196builder.WithAnnotation(new EmulatorResourceAnnotation()); 201.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 (34)
AzureAppServiceTests.cs (1)
774.WithAnnotation(new AzureAppServiceWebsiteCustomizationAnnotation((_, _) => { }));
AzureContainerAppsTests.cs (2)
1956.WithAnnotation(new AzureContainerAppCustomizationAnnotation((_, _) => { })); 1959.WithAnnotation(new AzureContainerAppJobCustomizationAnnotation((_, _) => { }));
AzureCosmosDBExtensionsTests.cs (4)
798cosmos.WithAnnotation(new HttpsCertificateAnnotation 829cosmos.WithAnnotation(new HttpsCertificateAnnotation 859cosmos.WithAnnotation(new HttpsCertificateAnnotation 888cosmos.WithAnnotation(new HttpsCertificateAnnotation
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());
AzureSandboxesTests.cs (3)
267.WithAnnotation(new AppIdentityAnnotation(computeIdentity.Resource)) 289.WithAnnotation(new AppIdentityAnnotation(identity.Resource)) 315.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());
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 (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.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)
135.WithAnnotation(new DockerComposeServiceCustomizationAnnotation((_, _) => { }));
Aspire.Hosting.Dotnet (3)
DotnetProjectBuildCoordinator.cs (1)
67resourceBuilder.WithAnnotation(new DotnetProgramBuildCompletionAnnotation(
DotnetProjectHostingExtensions.cs (2)
164builder.WithAnnotation(new DotnetProjectBuildEnvironmentCallbackAnnotation(callback)); 319.WithAnnotation(projectMetadata)
Aspire.Hosting.Dotnet.Tests (5)
DotnetProjectBuildCoordinatorTests.cs (3)
2371var resourceBuilder = builder.AddResource(resource).WithAnnotation(metadata); 2395var removedBuilder = builder.AddResource(removedResource).WithAnnotation(removedMetadata); 2402var activeBuilder = builder.AddResource(activeResource).WithAnnotation(activeMetadata);
DotnetProjectResourceTests.cs (2)
307.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/sentinel.txt" }); 314.WithAnnotation(new ContainerFilesDestinationAnnotation
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
754toolBuilder.WithAnnotation(callback);
Aspire.Hosting.EntityFrameworkCore.Tests (6)
EFBuildCustomizationWarningTests.cs (1)
35.WithAnnotation(new CustomBuildProjectMetadata { ProjectPath = startupPath })
EFBuildReadinessTests.cs (5)
26.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, cancellationToken) => 59.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, cancellationToken) => 125.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, _) => 165.WithAnnotation(new DotnetProgramBuildCompletionAnnotation((_, token) => completion.Task.WaitAsync(token))); 198.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)
366builder.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)
288rb.WithAnnotation(new GoPackagePathAnnotation(packagePath), ResourceAnnotationMutationBehavior.Replace); 293rb.WithAnnotation(new GoBuildTagsAnnotation(buildTags), ResourceAnnotationMutationBehavior.Replace); 298rb.WithAnnotation(new GoLdFlagsAnnotation(ldFlags), ResourceAnnotationMutationBehavior.Replace); 303rb.WithAnnotation(new GoGcFlagsAnnotation(gcFlags), ResourceAnnotationMutationBehavior.Replace); 308rb.WithAnnotation(new GoRaceDetectorAnnotation(), ResourceAnnotationMutationBehavior.Replace); 343return builder.WithAnnotation(new GoAppArgsAnnotation(args), ResourceAnnotationMutationBehavior.Replace); 366builder.WithAnnotation(new GoModTidyAnnotation()); 380builder.WithAnnotation(new GoModTidyBuilderAnnotation(tidy)); 416builder.WithAnnotation(new GoModVendorAnnotation()); 435builder.WithAnnotation(new GoModVendorBuilderAnnotation(vendor)); 462builder.WithAnnotation(new GoModDownloadAnnotation()); 510builder.WithAnnotation(new GoVetToolAnnotation()); 586return builder.WithAnnotation( 712.WithAnnotation( 715.WithAnnotation(
Aspire.Hosting.Go.Tests (4)
AddGoAppTests.cs (4)
956.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 987.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 1020.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 1026.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)
136resourceBuilder.WithAnnotation(new PipelineStepAnnotation(_ => 138resourceBuilder.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)
304builder.WithAnnotation(new KubernetesPersistentVolumeCustomizationAnnotation(configure)); 352builder.WithAnnotation(new VolumeMountBindingAnnotation(volume.Resource.Name) 367builder.WithAnnotation(new KubernetesPersistentVolumeBindingAnnotation( 525builder.WithAnnotation(new ContainerMountAnnotation( 531builder.WithAnnotation(binding); 535builder.WithAnnotation(new EnvironmentCallbackAnnotation(context => 541builder.WithAnnotation(new KubernetesPersistentVolumeBindingAnnotation(
KubernetesServiceExtensions.cs (1)
47return builder.WithAnnotation(new KubernetesServiceCustomizationAnnotation(configure));
Aspire.Hosting.Kubernetes.Tests (1)
KubernetesEnvironmentResourceTests.cs (1)
83.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)
366.WithAnnotation(new PythonEntrypointAnnotation 928builder.WithAnnotation(new PythonExecutableDebuggableAnnotation()); 1059builder.WithAnnotation(new PythonEntrypointAnnotation 1172.WithAnnotation(new PythonPackageManagerAnnotation(virtualEnvironment.GetExecutable("pip")), ResourceAnnotationMutationBehavior.Replace) 1173.WithAnnotation(new PythonInstallCommandAnnotation([.. baseInstallArgs, .. installArgs ?? []]), ResourceAnnotationMutationBehavior.Replace); 1241.WithAnnotation(new PythonPackageManagerAnnotation("uv"), ResourceAnnotationMutationBehavior.Replace) 1242.WithAnnotation(new PythonInstallCommandAnnotation(args), ResourceAnnotationMutationBehavior.Replace); 1356builder.WithAnnotation(new PythonPackageInstallerAnnotation(installer)); 1531builder.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([ 799.WithAnnotation(new McpServerEndpointAnnotation((resource, cancellationToken) => 1417resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1456resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1495resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1529resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1564resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1987resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 1993otherResource.WithAnnotation(new DcpInstancesAnnotation([ 2047resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 2787resourceWithReplicas.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)
382.WithAnnotation(new ReplicaAnnotation(3)); 1504.WithAnnotation(new ContainerImageAnnotation { Image = "image" }) 1505.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = ContainerLifetime.Persistent }) 5499.WithAnnotation(new ExecutableAnnotation 5879.WithAnnotation(new ReplicaAnnotation(2)) 6898.WithAnnotation(new ExecutableAnnotation 6958.WithAnnotation(new ExecutableAnnotation 7010.WithAnnotation(new ExecutableAnnotation 7054.WithAnnotation(new ExecutableAnnotation 7487.WithAnnotation(new ExecutableAnnotation 7602.WithAnnotation(new ExecutableAnnotation 7662.WithAnnotation(new ExecutableAnnotation 7705.WithAnnotation(new ExecutableAnnotation 8056.WithAnnotation(new TestFileBasedProject(projectPath)); 8102.WithAnnotation(new TestFileBasedProject(projectPath)); 8320.WithAnnotation(new ExecutableAnnotation 8624.WithAnnotation(new TestProjectWithLaunchSettings()) 8625.WithAnnotation(new LaunchProfileAnnotation("http")) 8689.WithAnnotation(new TestProjectWithLaunchSettings()) 8719.WithAnnotation(new TestProjectWithLaunchSettings()) 8752.WithAnnotation(new TestProjectWithLaunchSettings()) 9215.WithAnnotation(new TestProjectWithLaunchSettings()) 9250.WithAnnotation(new TestProjectWithLaunchSettings()) 9318.WithAnnotation(new TestProjectWithLaunchSettings()) 9568.WithAnnotation(new TestProjectWithLaunchSettings()) 9569.WithAnnotation(new LaunchProfileAnnotation("http")) 11101.WithAnnotation(new ReplicaAnnotation(2)) 11102.WithAnnotation(new DcpInstancesAnnotation(
DebugSupportExtensionsTests.cs (1)
445.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)
712.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 742.WithAnnotation(new HttpsCertificateAnnotation 773.WithAnnotation(new HttpsCertificateAnnotation 819.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 858.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 859.WithAnnotation(new HttpsCertificateConfigurationCallbackAnnotation(ctx =>
ExpressionResolverTests.cs (2)
210.WithAnnotation(nonHostEndpoint); 264.WithAnnotation(endpoint);
ManifestGenerationTests.cs (9)
559.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 563.WithAnnotation(new ContainerFilesDestinationAnnotation 601.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 602.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 606.WithAnnotation(new ContainerFilesDestinationAnnotation 645.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 648.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 652.WithAnnotation(new ContainerFilesDestinationAnnotation 657.WithAnnotation(new ContainerFilesDestinationAnnotation
ProjectResourceBuilderExtensionTests.cs (8)
103.WithAnnotation<IProjectMetadata>(new TestProject()) 115.WithAnnotation<IProjectMetadata>(new TestProject()) 116.WithAnnotation<IProjectMetadata>(new OverrideTestProject()); 134project.WithAnnotation<IProjectMetadata>(new OverrideTestProject(), mutationBehavior); 232.WithAnnotation<IProjectMetadata>(new TestProject()) 320.WithAnnotation<IProjectMetadata>(new TestProject()) 405.WithAnnotation<IProjectMetadata>(new TestProject()) 445.WithAnnotation<IProjectMetadata>(new TestProject())
ProjectResourceTests.cs (3)
885.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 921.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 982.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" });
Publishing\DotnetProgramArchiveTests.cs (2)
380.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 382.WithAnnotation(new ContainerFilesDestinationAnnotation
Publishing\ResourceContainerImageManagerTests.cs (27)
688.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj"))) 719.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 752.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "missing.csproj"))) 799.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 839.WithAnnotation(new TestProjectMetadata(projectPath)) 890.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 895.WithAnnotation(new TestProjectMetadata(projectPath)) 896.WithAnnotation(new ContainerFilesDestinationAnnotation 979.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 983.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "program.csproj"))) 984.WithAnnotation(new ContainerFilesDestinationAnnotation 1031.WithAnnotation(new TestProjectMetadata(Path.Combine(workspace.WorkspaceRoot.FullName, "app.cs"))) 1074.WithAnnotation(new TestProjectMetadata(projectPath)) 1111.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 1114.WithAnnotation(new TestProjectMetadata(projectPath)) 1115.WithAnnotation(new ContainerFilesDestinationAnnotation 1172.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/assets" }); 1175.WithAnnotation(new TestProjectMetadata(projectPath)) 1176.WithAnnotation(new ContainerFilesDestinationAnnotation 1259.WithAnnotation(new TestProjectMetadata(projectPath)) 1650.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1656.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1687.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1694.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1825.WithAnnotation(dockerfileBuildAnnotation); 1836container.WithAnnotation(defaultContainerBuildOptions); 1862.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) 613resource.WithAnnotation(new DcpInstancesAnnotation([])); 627.WithAnnotation(new DcpInstancesAnnotation([ 650resource.WithAnnotation(new DcpInstancesAnnotation([])); 663.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)
267.WithAnnotation(new ReplicaAnnotation(2)); 293.WithAnnotation(new ReplicaAnnotation(2)) 351.WithAnnotation(new ReplicaAnnotation(2)) 1176.WithAnnotation(new ReplicaAnnotation(3)); 1208resource.WithAnnotation(new ReplicaAnnotation(3)); 1227.WithAnnotation(new ReplicaAnnotation(2)); 1300.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)
58.WithAnnotation(new FakeProjectMetadata(projectPath)) 59.WithAnnotation(new LaunchProfileAnnotation(launchProfileName));