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)
647public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
Aspire.Hosting.RemoteHost.Tests (1)
CapabilityDispatcherTests.cs (1)
1783public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
320 references to WithAnnotation
Aspire.Hosting (95)
ApplicationModel\IResourceBuilder.cs (1)
29IResourceBuilder<T> WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation, new() => WithAnnotation(new TAnnotation(), behavior);
ApplicationModel\ResourceExtensions.cs (2)
490return builder.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Append); 511return builder.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Append);
ContainerRegistryResourceBuilderExtensions.cs (1)
166return builder.WithAnnotation(new ContainerRegistryReferenceAnnotation(registry.Resource));
ContainerResourceBuilderExtensions.cs (25)
31builder.WithAnnotation(new PipelineStepAnnotation((factoryContext) => 76return builder.WithAnnotation(new PipelineConfigurationAnnotation(context => 163return builder.WithAnnotation(annotation); 204return builder.WithAnnotation(annotation); 263return builder.WithAnnotation(annotation); 485return builder.WithAnnotation(annotation); 513return builder.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace); 528return builder.WithAnnotation(new ContainerImagePullPolicyAnnotation { ImagePullPolicy = pullPolicy }, ResourceAnnotationMutationBehavior.Replace); 627return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 628.WithAnnotation(defaultContainerBuildOptions) 632return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 633.WithAnnotation(defaultContainerBuildOptions) 775return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 776.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 780return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 781.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 1008return builder.WithAnnotation(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace); 1178return builder.WithAnnotation(new ContainerCertificatePathsAnnotation 1245return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1318return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1362return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1390builder.WithAnnotation(new ProxySupportAnnotation { ProxyEnabled = proxyEnabled }, ResourceAnnotationMutationBehavior.Replace); 1457builder.WithAnnotation(callbackAnnotation); 1590return builder.WithAnnotation(new DockerfileBaseImageAnnotation 1617return builder.WithAnnotation(new ContainerNetworkAliasAnnotation(alias) { Network = KnownNetworkIdentifiers.DefaultAspireContainerNetwork });
CustomResourceExtensions.cs (1)
28return builder.WithAnnotation(new ResourceSnapshotAnnotation(initialSnapshot), ResourceAnnotationMutationBehavior.Replace);
McpServerResourceBuilderExtensions.cs (1)
50return builder.WithAnnotation(new McpServerEndpointAnnotation(async (resource, cancellationToken) =>
Pipelines\PipelineStepFactoryExtensions.cs (6)
31return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 50return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 69return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 88return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 145return builder.WithAnnotation(new PipelineConfigurationAnnotation(callback)); 164return builder.WithAnnotation(new PipelineConfigurationAnnotation(callback));
ProjectResourceBuilderExtensions.cs (9)
255.WithAnnotation(projectMetadata) 301.WithAnnotation(new ProjectMetadata(projectPath)) 384.WithAnnotation(projectMetadata) 479builder.WithAnnotation(new ExcludeLaunchProfileAnnotation()); 483builder.WithAnnotation(new LaunchProfileAnnotation(options.LaunchProfileName)); 491builder.WithAnnotation(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName)); 756builder.WithAnnotation(new ReplicaAnnotation(replicas)); 928.WithAnnotation(new ExplicitStartupAnnotation()) 929.WithAnnotation(new ExcludeLifecycleCommandsAnnotation())
RequiredCommandResourceExtensions.cs (2)
38builder.WithAnnotation(new RequiredCommandAnnotation(command) 75builder.WithAnnotation(new RequiredCommandAnnotation(command)
ResourceBuilderExtensions.cs (47)
41return builder.WithAnnotation(new EnvironmentAnnotation(name, value ?? string.Empty)); 125return builder.WithAnnotation(new EnvironmentCallbackAnnotation(name, callback)); 141return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 157return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 326return builder.WithAnnotation(new ConnectionPropertyAnnotation(name, value)); 344return builder.WithAnnotation(new ConnectionPropertyAnnotation(name, ReferenceExpression.Create($"{value}"))); 415return builder.WithAnnotation(new CommandLineArgsCallbackAnnotation(callback)); 433return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 451return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 469return builder.WithAnnotation(new ConnectionStringRedirectAnnotation(resource), ResourceAnnotationMutationBehavior.Replace); 549return builder.WithAnnotation(new ReferenceEnvironmentInjectionAnnotation(flags)); 987builder.WithAnnotation(endpointReferenceAnnotation); 1120builder.WithAnnotation(new EnvironmentCallbackAnnotation(context => 1126return builder.WithAnnotation(annotation); 1265return builder.WithAnnotation(new Http2ServiceAnnotation()); 1322return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(callback)); 1346return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(callback)); 1402return builder.WithAnnotation(new ResourceUrlAnnotation { Url = url, DisplayText = displayText }); 1448return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(async c => 1587return builder.WithAnnotation(new ContainerFilesDestinationAnnotation() 1610return builder.WithAnnotation(new ContainerFilesSourceAnnotation() 1647return builder.WithAnnotation(ManifestPublishingCallbackAnnotation.Ignore); 1757return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilHealthy) { WaitBehavior = waitBehavior }); 1873return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilStarted) { WaitBehavior = waitBehavior }); 1900return builder.WithAnnotation(new ExplicitStartupAnnotation()); 1947return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitForCompletion, exitCode)); 1997builder.WithAnnotation(new HealthCheckAnnotation(key)); 2206return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, commandOptions.UpdateState ?? (c => ResourceCommandState.Enabled), executeCommand, commandOptions.Description, commandOptions.Parameter, commandOptions.ConfirmationMessage, commandOptions.IconName, commandOptions.IconVariant, commandOptions.IsHighlighted)); 2271return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted)); 2561return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2611return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2660return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2697return builder.WithAnnotation(new CertificateTrustConfigurationCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 2731return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2767return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2798return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2833return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 2994return builder.WithAnnotation(new ResourceRelationshipAnnotation(resource, type)); 3013return builder.WithAnnotation(new ResourceRelationshipAnnotation(resource, KnownRelationshipTypes.Reference)); 3093return builder.WithAnnotation(new ResourceRelationshipAnnotation(resourceBuilder.Resource, KnownRelationshipTypes.Reference)); 3260return builder.WithAnnotation(new ResourceIconAnnotation(iconName, iconVariant)); 3280builder.WithAnnotation(new ComputeEnvironmentAnnotation(computeEnvironmentResource.Resource)); 3314return builder.WithAnnotation(SupportsDebuggingAnnotation.Create(launchConfigurationType, launchConfigurationProducer)); 3449return builder.WithAnnotation(probeAnnotation); 3463return builder.WithAnnotation(new ExcludeFromMcpAnnotation()); 3502return builder.WithAnnotation(new ContainerImagePushOptionsCallbackAnnotation(callback)); 3543return builder.WithAnnotation(new ContainerImagePushOptionsCallbackAnnotation(callback));
Aspire.Hosting.Azure (6)
AzureUserAssignedIdentityExtensions.cs (1)
69builder.WithAnnotation(new AppIdentityAnnotation(identityResourceBuilder.Resource));
ExistingAzureResourceExtensions.cs (5)
56builder.WithAnnotation(new ExistingAzureResourceAnnotation(nameParameter.Resource, resourceGroupParameter?.Resource)); 78builder.WithAnnotation(new ExistingAzureResourceAnnotation(name, resourceGroup)); 100builder.WithAnnotation(new ExistingAzureResourceAnnotation(nameParameter.Resource, resourceGroupParameter?.Resource)); 122builder.WithAnnotation(new ExistingAzureResourceAnnotation(name, resourceGroup)); 142builder.WithAnnotation(new ExistingAzureResourceAnnotation(nameParameter.Resource, resourceGroupParameter?.Resource));
Aspire.Hosting.Azure.AppConfiguration (3)
AzureAppConfigurationExtensions.cs (1)
105.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 (5)
AzureContainerAppContainerExtensions.cs (1)
48container.WithAnnotation(new AzureContainerAppCustomizationAnnotation(configure));
AzureContainerAppExecutableExtensions.cs (1)
48return executable.WithAnnotation(new AzureContainerAppCustomizationAnnotation(configure));
AzureContainerAppExtensions.cs (1)
497builder.WithAnnotation(new AzureLogAnalyticsWorkspaceReferenceAnnotation(workspaceBuilder.Resource));
AzureContainerAppProjectExtensions.cs (1)
48project.WithAnnotation(new AzureContainerAppCustomizationAnnotation(configure));
ContainerAppExtensions.cs (1)
169resource.WithAnnotation(new AzureContainerAppJobCustomizationAnnotation(configure));
Aspire.Hosting.Azure.ApplicationInsights (1)
AzureApplicationInsightsExtensions.cs (1)
139return builder.WithAnnotation(new LogAnalyticsWorkspaceReferenceAnnotation(workspaceId));
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceComputeResourceExtensions.cs (3)
55builder = builder.WithAnnotation(new AzureAppServiceWebsiteCustomizationAnnotation(configure)); 60builder = builder.WithAnnotation(new AzureAppServiceWebsiteSlotCustomizationAnnotation(configureSlot)); 95return builder.WithAnnotation(new AzureAppServiceIgnoreEnvironmentVariableChecksAnnotation());
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)
71.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>())); 112builder.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)
45.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>())); 91builder.WithAnnotation(new EmulatorResourceAnnotation()); 95.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.EventHubs (7)
AzureEventHubsExtensions.cs (5)
256builder.WithAnnotation(new EmulatorResourceAnnotation()); 262.WithAnnotation(new ContainerImageAnnotation 294builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) => 430return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace); 446builder.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.Functions (5)
AzureFunctionsProjectResourceExtensions.cs (3)
188.WithAnnotation(projectMetadata) 189.WithAnnotation(new AzureFunctionsAnnotation()) 205functionsBuilder.WithAnnotation(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName));
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.Kusto (6)
AzureKustoBuilderExtensions.cs (4)
96.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>())); 165builder.WithAnnotation(new EmulatorResourceAnnotation()); 174.WithAnnotation(new ContainerImageAnnotation 204builder.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)
100builder.WithAnnotation(new ContainerNameAnnotation() { Name = "custom-kusto-emulator" });
Aspire.Hosting.Azure.Network (2)
AzureVirtualNetworkExtensions.cs (2)
271builder.WithAnnotation( 275subnet.WithAnnotation(new AzureSubnetServiceDelegationAnnotation(
Aspire.Hosting.Azure.PostgreSQL (2)
AzurePostgresExtensions.cs (2)
83builder.WithAnnotation(new AzureBicepResourceAnnotation(resource)); 151.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
Aspire.Hosting.Azure.Redis (3)
AzureManagedRedisExtensions.cs (1)
58.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
AzureRedisExtensions.cs (2)
66builder.WithAnnotation(new AzureBicepResourceAnnotation(resource)); 126.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
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 (7)
AzureServiceBusExtensions.cs (5)
395builder.WithAnnotation(new EmulatorResourceAnnotation()); 405.WithAnnotation(new ContainerImageAnnotation 426builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) => 522return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace); 554builder.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.SignalR (4)
AzureSignalRExtensions.cs (2)
154builder.WithAnnotation(new EmulatorResourceAnnotation()); 158.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)); 96.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
AzureSqlServerResource.cs (1)
475.WithAnnotation(new ExistingAzureResourceAnnotation(AdminName));
Aspire.Hosting.Azure.Storage (4)
AzureStorageExtensions.cs (2)
192builder.WithAnnotation(new EmulatorResourceAnnotation()); 197.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 (23)
AzureCosmosDBExtensionsTests.cs (4)
726cosmos.WithAnnotation(new HttpsCertificateAnnotation 757cosmos.WithAnnotation(new HttpsCertificateAnnotation 787cosmos.WithAnnotation(new HttpsCertificateAnnotation 816cosmos.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());
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 (1)
118.WithAnnotation(new AzureSubnetServiceDelegationAnnotation("ContainerAppsDelegation", "Microsoft.App/environments"));
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.CodeGeneration.Go.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
70return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.CodeGeneration.Java.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
70return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.CodeGeneration.Python.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
70return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.CodeGeneration.Rust.Tests (1)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (1)
70return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
TestTypes\TestExtensions.cs (1)
70return builder.WithAnnotation(new TestPersistenceAnnotation(mode));
Aspire.Hosting.Docker (1)
DockerComposeServiceExtensions.cs (1)
48return builder.WithAnnotation(new DockerComposeServiceCustomizationAnnotation(configure));
Aspire.Hosting.Foundry (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.Garnet (1)
GarnetBuilderExtensions.cs (1)
301return builder.WithAnnotation(new PersistenceAnnotation(interval), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.JavaScript (13)
JavaScriptHostingExtensions.cs (13)
465.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" }) 697.WithAnnotation(new JavaScriptPackageManagerAnnotation("npm", runScriptCommand: "run", cacheMount: "/root/.npm") 701.WithAnnotation(new JavaScriptInstallCommandAnnotation([installCommand, .. installArgs ?? []])) 755.WithAnnotation(new JavaScriptPackageManagerAnnotation("bun", runScriptCommand: "run", cacheMount: "/root/.bun/install/cache") 761.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs])) 768resource.WithAnnotation(new DockerfileBaseImageAnnotation 835.WithAnnotation(packageManager) 836.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs])) 889.WithAnnotation(new JavaScriptPackageManagerAnnotation("pnpm", runScriptCommand: "run", cacheMount: "/pnpm/store") 897.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs])) 924return resource.WithAnnotation(new JavaScriptBuildScriptAnnotation(scriptName, args)); 943return resource.WithAnnotation(new JavaScriptRunScriptAnnotation(scriptName, args)); 1172resource.WithAnnotation(new JavaScriptPackageInstallerAnnotation(installer));
Aspire.Hosting.JavaScript.Tests (4)
AddNodeAppTests.cs (4)
174.WithAnnotation(new JavaScriptPackageManagerAnnotation("mypm", runScriptCommand: null, cacheMount: null) 178.WithAnnotation(new JavaScriptInstallCommandAnnotation(["myinstall"])) 355.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" }); 411.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" });
Aspire.Hosting.Kubernetes (1)
KubernetesServiceExtensions.cs (1)
47return builder.WithAnnotation(new KubernetesServiceCustomizationAnnotation(configure));
Aspire.Hosting.Maui (17)
MauiAndroidExtensions.cs (6)
160.WithAnnotation(new MauiProjectMetadata(projectPath)) 161.WithAnnotation(new MauiAndroidEnvironmentAnnotation()) // Enable environment variable support via targets file 162.WithAnnotation(new ExecutableAnnotation 354.WithAnnotation(new MauiProjectMetadata(projectPath)) 355.WithAnnotation(new MauiAndroidEnvironmentAnnotation()) // Enable environment variable support via targets file 356.WithAnnotation(new ExecutableAnnotation
MauiiOSExtensions.cs (6)
167.WithAnnotation(new MauiProjectMetadata(projectPath)) 168.WithAnnotation(new MauiiOSEnvironmentAnnotation()) // Enable environment variable support via targets file 169.WithAnnotation(new ExecutableAnnotation 362.WithAnnotation(new MauiProjectMetadata(projectPath)) 363.WithAnnotation(new MauiiOSEnvironmentAnnotation()) // Enable environment variable support via targets file 364.WithAnnotation(new ExecutableAnnotation
MauiMacCatalystExtensions.cs (2)
91.WithAnnotation(new MauiProjectMetadata(projectPath)) 92.WithAnnotation(new ExecutableAnnotation
MauiPlatformHelper.cs (1)
107resourceBuilder.WithAnnotation(new UnsupportedPlatformAnnotation(reason), ResourceAnnotationMutationBehavior.Append);
MauiWindowsExtensions.cs (2)
91.WithAnnotation(new MauiProjectMetadata(projectPath)) 92.WithAnnotation(new ExecutableAnnotation
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
192builder.WithAnnotation(new MySqlCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
539builder.WithAnnotation(new PostgresCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.Python (9)
PythonAppResourceBuilderExtensions.cs (9)
362.WithAnnotation(new PythonEntrypointAnnotation 922builder.WithAnnotation(new PythonExecutableDebuggableAnnotation()); 1070builder.WithAnnotation(new PythonEntrypointAnnotation 1180.WithAnnotation(new PythonPackageManagerAnnotation(virtualEnvironment.GetExecutable("pip")), ResourceAnnotationMutationBehavior.Replace) 1181.WithAnnotation(new PythonInstallCommandAnnotation([.. baseInstallArgs, .. installArgs ?? []]), ResourceAnnotationMutationBehavior.Replace); 1248.WithAnnotation(new PythonPackageManagerAnnotation("uv"), ResourceAnnotationMutationBehavior.Replace) 1249.WithAnnotation(new PythonInstallCommandAnnotation(args), ResourceAnnotationMutationBehavior.Replace); 1362builder.WithAnnotation(new PythonPackageInstallerAnnotation(installer)); 1536builder.WithAnnotation(existing);
Aspire.Hosting.Python.Tests (1)
AddUvicornAppTests.cs (1)
78.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" });
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
503return builder.WithAnnotation(
Aspire.Hosting.SqlServer (1)
SqlServerBuilderExtensions.cs (1)
214builder.WithAnnotation(new SqlServerCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.Tests (56)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (2)
40resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([ 325resourceWithReplicas.WithAnnotation(new DcpInstancesAnnotation([
Backchannel\Exec\ProjectResourceExecTests.cs (1)
137.WithAnnotation<IProjectMetadata>(new ProjectMetadata(Directory.GetCurrentDirectory()));
ExecutionConfigurationGathererTests.cs (6)
609.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 638.WithAnnotation(new HttpsCertificateAnnotation 669.WithAnnotation(new HttpsCertificateAnnotation 715.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 751.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 752.WithAnnotation(new HttpsCertificateConfigurationCallbackAnnotation(ctx =>
ExpressionResolverTests.cs (1)
227.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
ProjectResourceTests.cs (2)
821.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 853.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" });
Publishing\ResourceContainerImageManagerTests.cs (7)
958.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 964.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 995.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1002.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 1098.WithAnnotation(dockerfileBuildAnnotation); 1109container.WithAnnotation(defaultContainerBuildOptions); 1135.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(async ctx =>
ResourceCommandServiceTests.cs (6)
39custom.WithAnnotation(new DcpInstancesAnnotation([ 83custom.WithAnnotation(new DcpInstancesAnnotation([ 120custom.WithAnnotation(new DcpInstancesAnnotation([ 160custom.WithAnnotation(new DcpInstancesAnnotation([ 225custom.WithAnnotation(new DcpInstancesAnnotation([ 256custom.WithAnnotation(new DcpInstancesAnnotation([
ResourceExtensionsTests.cs (16)
31.WithAnnotation(new AnotherDummyAnnotation()); 43.WithAnnotation(new DummyAnnotation()); 55.WithAnnotation(new DummyAnnotation()); 78.WithAnnotation(new AnotherDummyAnnotation()); 90.WithAnnotation(new AnotherDummyAnnotation()); 93.WithAnnotation(new AnotherDummyAnnotation()); 105.WithAnnotation(new DummyAnnotation()); 119.WithAnnotation(new DummyAnnotation()); 122.WithAnnotation(new DummyAnnotation()); 134.WithAnnotation(new DummyAnnotation()); 137.WithAnnotation(new DummyAnnotation()); 140.WithAnnotation(new DummyAnnotation()); 524resource.WithAnnotation(new DcpInstancesAnnotation([])); 538.WithAnnotation(new DcpInstancesAnnotation([ 561resource.WithAnnotation(new DcpInstancesAnnotation([])); 574.WithAnnotation(new DcpInstancesAnnotation([
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([
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
288return builder.WithAnnotation(
Aspire.Hosting.Yarp.Tests (10)
AddYarpTests.cs (10)
232.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 250.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 277.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 307.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 339.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 340.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 370.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 371.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 375.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist2" }) 376.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets2" });