1 implementation of WithAnnotation
Aspire.Hosting (1)
DistributedApplicationResourceBuilder.cs (1)
14public IResourceBuilder<T> WithAnnotation<TAnnotation>(TAnnotation annotation, ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation
287 references to WithAnnotation
Aspire.Hosting (90)
ApplicationModel\IResourceBuilder.cs (1)
29IResourceBuilder<T> WithAnnotation<TAnnotation>(ResourceAnnotationMutationBehavior behavior = ResourceAnnotationMutationBehavior.Append) where TAnnotation : IResourceAnnotation, new() => WithAnnotation(new TAnnotation(), behavior);
ApplicationModel\ResourceExtensions.cs (2)
523return builder.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Append); 542return builder.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Append);
ContainerRegistryResourceBuilderExtensions.cs (1)
163return builder.WithAnnotation(new ContainerRegistryReferenceAnnotation(registry.Resource));
ContainerResourceBuilderExtensions.cs (25)
32builder.WithAnnotation(new PipelineStepAnnotation((factoryContext) => 77return builder.WithAnnotation(new PipelineConfigurationAnnotation(context => 158return builder.WithAnnotation(annotation); 198return builder.WithAnnotation(annotation); 256return builder.WithAnnotation(annotation); 468return builder.WithAnnotation(annotation); 495return builder.WithAnnotation(new ContainerLifetimeAnnotation { Lifetime = lifetime }, ResourceAnnotationMutationBehavior.Replace); 509return builder.WithAnnotation(new ContainerImagePullPolicyAnnotation { ImagePullPolicy = pullPolicy }, ResourceAnnotationMutationBehavior.Replace); 606return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 607.WithAnnotation(defaultContainerBuildOptions) 611return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 612.WithAnnotation(defaultContainerBuildOptions) 748return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 749.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 753return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace) 754.WithAnnotation(defaultContainerBuildOptions, ResourceAnnotationMutationBehavior.Append) 971return builder.WithAnnotation(new ContainerNameAnnotation { Name = name }, ResourceAnnotationMutationBehavior.Replace); 1135return builder.WithAnnotation(new ContainerCertificatePathsAnnotation 1200return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1271return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1313return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 1340builder.WithAnnotation(new ProxySupportAnnotation { ProxyEnabled = proxyEnabled }, ResourceAnnotationMutationBehavior.Replace); 1405builder.WithAnnotation(callbackAnnotation); 1535return builder.WithAnnotation(new DockerfileBaseImageAnnotation 1561return builder.WithAnnotation(new ContainerNetworkAliasAnnotation(alias) { Network = KnownNetworkIdentifiers.DefaultAspireContainerNetwork });
CustomResourceExtensions.cs (1)
26return builder.WithAnnotation(new ResourceSnapshotAnnotation(initialSnapshot), ResourceAnnotationMutationBehavior.Replace);
Pipelines\PipelineStepFactoryExtensions.cs (6)
29return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 46return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 63return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 80return builder.WithAnnotation(new PipelineStepAnnotation(factory)); 98return builder.WithAnnotation(new PipelineConfigurationAnnotation(callback)); 116return builder.WithAnnotation(new PipelineConfigurationAnnotation(callback));
ProjectResourceBuilderExtensions.cs (7)
244.WithAnnotation(new TProject()) 288.WithAnnotation(new ProjectMetadata(projectPath)) 369.WithAnnotation(projectMetadata) 462builder.WithAnnotation(new ExcludeLaunchProfileAnnotation()); 466builder.WithAnnotation(new LaunchProfileAnnotation(options.LaunchProfileName)); 474builder.WithAnnotation(new DefaultLaunchProfileAnnotation(appHostDefaultLaunchProfileName)); 738builder.WithAnnotation(new ReplicaAnnotation(replicas));
ResourceBuilderExtensions.cs (47)
39return builder.WithAnnotation(new EnvironmentAnnotation(name, value ?? string.Empty)); 103return builder.WithAnnotation(new EnvironmentCallbackAnnotation(name, callback)); 118return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 133return builder.WithAnnotation(new EnvironmentCallbackAnnotation(callback)); 294return builder.WithAnnotation(new ConnectionPropertyAnnotation(name, value)); 311return builder.WithAnnotation(new ConnectionPropertyAnnotation(name, ReferenceExpression.Create($"{value}"))); 377return builder.WithAnnotation(new CommandLineArgsCallbackAnnotation(callback)); 393return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 409return builder.WithAnnotation(new ManifestPublishingCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 425return builder.WithAnnotation(new ConnectionStringRedirectAnnotation(resource), ResourceAnnotationMutationBehavior.Replace); 483return builder.WithAnnotation(new ReferenceEnvironmentInjectionAnnotation(flags)); 785builder.WithAnnotation(endpointReferenceAnnotation); 916builder.WithAnnotation(new EnvironmentCallbackAnnotation(context => 922return builder.WithAnnotation(annotation); 1052return builder.WithAnnotation(new Http2ServiceAnnotation()); 1108return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(callback)); 1131return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(callback)); 1186return builder.WithAnnotation(new ResourceUrlAnnotation { Url = url, DisplayText = displayText }); 1229return builder.WithAnnotation(new ResourceUrlsCallbackAnnotation(async c => 1365return builder.WithAnnotation(new ContainerFilesDestinationAnnotation() 1387return builder.WithAnnotation(new ContainerFilesSourceAnnotation() 1422return builder.WithAnnotation(ManifestPublishingCallbackAnnotation.Ignore); 1530return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilHealthy) { WaitBehavior = waitBehavior }); 1644return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilStarted) { WaitBehavior = waitBehavior }); 1670return builder.WithAnnotation(new ExplicitStartupAnnotation()); 1716return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitForCompletion, exitCode)); 1765builder.WithAnnotation(new HealthCheckAnnotation(key)); 1970return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, commandOptions.UpdateState ?? (c => ResourceCommandState.Enabled), executeCommand, commandOptions.Description, commandOptions.Parameter, commandOptions.ConfirmationMessage, commandOptions.IconName, commandOptions.IconVariant, commandOptions.IsHighlighted)); 2035return builder.WithAnnotation(new ResourceCommandAnnotation(name, displayName, updateState ?? (c => ResourceCommandState.Enabled), executeCommand, displayDescription, parameter, confirmationMessage, iconName, iconVariant, isHighlighted)); 2332return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2381return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2429return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2464return builder.WithAnnotation(new CertificateTrustConfigurationCallbackAnnotation(callback), ResourceAnnotationMutationBehavior.Replace); 2497return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2531return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2561return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Replace); 2594return builder.WithAnnotation(annotation, ResourceAnnotationMutationBehavior.Append); 2680return builder.WithAnnotation(new ResourceRelationshipAnnotation(resource, type)); 2697return builder.WithAnnotation(new ResourceRelationshipAnnotation(resource, KnownRelationshipTypes.Reference)); 2773return builder.WithAnnotation(new ResourceRelationshipAnnotation(resourceBuilder.Resource, KnownRelationshipTypes.Reference)); 2933return builder.WithAnnotation(new ResourceIconAnnotation(iconName, iconVariant)); 2951builder.WithAnnotation(new ComputeEnvironmentAnnotation(computeEnvironmentResource.Resource)); 2986return builder.WithAnnotation(SupportsDebuggingAnnotation.Create(launchConfigurationType, launchConfigurationProducer)); 3106return builder.WithAnnotation(probeAnnotation); 3119return builder.WithAnnotation(new ExcludeFromMcpAnnotation()); 3156return builder.WithAnnotation(new ContainerImagePushOptionsCallbackAnnotation(callback)); 3195return builder.WithAnnotation(new ContainerImagePushOptionsCallbackAnnotation(callback));
Aspire.Hosting.Azure (6)
AzureUserAssignedIdentityExtensions.cs (1)
67builder.WithAnnotation(new AppIdentityAnnotation(identityResourceBuilder.Resource));
ExistingAzureResourceExtensions.cs (5)
42builder.WithAnnotation(new ExistingAzureResourceAnnotation(nameParameter.Resource, resourceGroupParameter?.Resource)); 63builder.WithAnnotation(new ExistingAzureResourceAnnotation(name, resourceGroup)); 84builder.WithAnnotation(new ExistingAzureResourceAnnotation(nameParameter.Resource, resourceGroupParameter?.Resource)); 105builder.WithAnnotation(new ExistingAzureResourceAnnotation(name, resourceGroup)); 124builder.WithAnnotation(new ExistingAzureResourceAnnotation(nameParameter.Resource, resourceGroupParameter?.Resource));
Aspire.Hosting.Azure.AIFoundry (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.AppConfiguration (3)
AzureAppConfigurationExtensions.cs (1)
82.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)
47container.WithAnnotation(new AzureContainerAppCustomizationAnnotation(configure));
AzureContainerAppExecutableExtensions.cs (1)
47return executable.WithAnnotation(new AzureContainerAppCustomizationAnnotation(configure));
AzureContainerAppExtensions.cs (1)
387builder.WithAnnotation(new AzureLogAnalyticsWorkspaceReferenceAnnotation(workspaceBuilder.Resource));
AzureContainerAppProjectExtensions.cs (1)
47project.WithAnnotation(new AzureContainerAppCustomizationAnnotation(configure));
ContainerAppExtensions.cs (1)
165resource.WithAnnotation(new AzureContainerAppJobCustomizationAnnotation(configure));
Aspire.Hosting.Azure.ApplicationInsights (1)
AzureApplicationInsightsExtensions.cs (1)
131return builder.WithAnnotation(new LogAnalyticsWorkspaceReferenceAnnotation(workspaceId));
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceComputeResourceExtensions.cs (2)
53builder = builder.WithAnnotation(new AzureAppServiceWebsiteCustomizationAnnotation(configure)); 58builder = builder.WithAnnotation(new AzureAppServiceWebsiteSlotCustomizationAnnotation(configureSlot));
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)
66.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>())); 106builder.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)
40.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>())); 82builder.WithAnnotation(new EmulatorResourceAnnotation()); 86.WithAnnotation(new ContainerImageAnnotation
Aspire.Hosting.Azure.EventHubs (7)
AzureEventHubsExtensions.cs (5)
239builder.WithAnnotation(new EmulatorResourceAnnotation()); 245.WithAnnotation(new ContainerImageAnnotation 277builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) => 411return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace); 425builder.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)
186.WithAnnotation(projectMetadata) 187.WithAnnotation(new AzureFunctionsAnnotation()); 206functionsBuilder.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>())); 163builder.WithAnnotation(new EmulatorResourceAnnotation()); 172.WithAnnotation(new ContainerImageAnnotation 201builder.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.PostgreSQL (2)
AzurePostgresExtensions.cs (2)
79builder.WithAnnotation(new AzureBicepResourceAnnotation(resource)); 146.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
Aspire.Hosting.Azure.Redis (3)
AzureManagedRedisExtensions.cs (1)
55.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)
367builder.WithAnnotation(new EmulatorResourceAnnotation()); 377.WithAnnotation(new ContainerImageAnnotation 398builder.WithAnnotation(new EnvironmentCallbackAnnotation((EnvironmentCallbackContext context) => 493return builder.WithAnnotation(new ConfigFileAnnotation(path), ResourceAnnotationMutationBehavior.Replace); 523builder.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)
126builder.WithAnnotation(new EmulatorResourceAnnotation()); 130.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 (2)
AzureSqlExtensions.cs (2)
38builder.WithAnnotation(new AzureBicepResourceAnnotation(resource)); 91.WithAnnotation(new DefaultRoleAssignmentsAnnotation(new HashSet<RoleDefinition>()));
Aspire.Hosting.Azure.Storage (4)
AzureStorageExtensions.cs (2)
159builder.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.Tests (18)
AzureManagedRedisExtensionsTests.cs (3)
120cache.WithAnnotation(new Dummy1Annotation()); 125c.WithAnnotation(new Dummy2Annotation()); 130cache.WithAnnotation(new Dummy1Annotation());
AzurePostgresExtensionsTests.cs (6)
269postgres.WithAnnotation(new Dummy1Annotation()); 270db?.WithAnnotation(new Dummy1Annotation()); 275c.WithAnnotation(new Dummy2Annotation()); 285db!.WithAnnotation(new Dummy1Annotation()); 291postgres.WithAnnotation(new Dummy1Annotation()); 292db!.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());
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.Docker (1)
DockerComposeServiceExtensions.cs (1)
47return builder.WithAnnotation(new DockerComposeServiceCustomizationAnnotation(configure));
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
286return builder.WithAnnotation(new PersistenceAnnotation(interval), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.JavaScript (10)
JavaScriptHostingExtensions.cs (10)
456.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" }) 705.WithAnnotation(new JavaScriptPackageManagerAnnotation("npm", runScriptCommand: "run", cacheMount: "/root/.npm") 709.WithAnnotation(new JavaScriptInstallCommandAnnotation([installCommand, .. installArgs ?? []])); 759.WithAnnotation(packageManager) 760.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs])); 811.WithAnnotation(new JavaScriptPackageManagerAnnotation("pnpm", runScriptCommand: "run", cacheMount: "/pnpm/store") 819.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs])); 844return resource.WithAnnotation(new JavaScriptBuildScriptAnnotation(scriptName, args)); 862return resource.WithAnnotation(new JavaScriptRunScriptAnnotation(scriptName, args)); 927resource.WithAnnotation(new JavaScriptPackageInstallerAnnotation(installer));
Aspire.Hosting.JavaScript.Tests (4)
AddNodeAppTests.cs (4)
165.WithAnnotation(new JavaScriptPackageManagerAnnotation("mypm", runScriptCommand: null, cacheMount: null) 169.WithAnnotation(new JavaScriptInstallCommandAnnotation(["myinstall"])) 346.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" }); 402.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" });
Aspire.Hosting.Kubernetes (1)
KubernetesServiceExtensions.cs (1)
46return builder.WithAnnotation(new KubernetesServiceCustomizationAnnotation(configure));
Aspire.Hosting.Maui (17)
MauiAndroidExtensions.cs (6)
151.WithAnnotation(new MauiProjectMetadata(projectPath)) 152.WithAnnotation(new MauiAndroidEnvironmentAnnotation()) // Enable environment variable support via targets file 153.WithAnnotation(new ExecutableAnnotation 336.WithAnnotation(new MauiProjectMetadata(projectPath)) 337.WithAnnotation(new MauiAndroidEnvironmentAnnotation()) // Enable environment variable support via targets file 338.WithAnnotation(new ExecutableAnnotation
MauiiOSExtensions.cs (6)
158.WithAnnotation(new MauiProjectMetadata(projectPath)) 159.WithAnnotation(new MauiiOSEnvironmentAnnotation()) // Enable environment variable support via targets file 160.WithAnnotation(new ExecutableAnnotation 344.WithAnnotation(new MauiProjectMetadata(projectPath)) 345.WithAnnotation(new MauiiOSEnvironmentAnnotation()) // Enable environment variable support via targets file 346.WithAnnotation(new ExecutableAnnotation
MauiMacCatalystExtensions.cs (2)
86.WithAnnotation(new MauiProjectMetadata(projectPath)) 87.WithAnnotation(new ExecutableAnnotation
MauiPlatformHelper.cs (1)
107resourceBuilder.WithAnnotation(new UnsupportedPlatformAnnotation(reason), ResourceAnnotationMutationBehavior.Append);
MauiWindowsExtensions.cs (2)
86.WithAnnotation(new MauiProjectMetadata(projectPath)) 87.WithAnnotation(new ExecutableAnnotation
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
189builder.WithAnnotation(new MySqlCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
453builder.WithAnnotation(new PostgresCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.Python (9)
PythonAppResourceBuilderExtensions.cs (9)
384.WithAnnotation(new PythonEntrypointAnnotation 942builder.WithAnnotation(new PythonExecutableDebuggableAnnotation()); 1089builder.WithAnnotation(new PythonEntrypointAnnotation 1198.WithAnnotation(new PythonPackageManagerAnnotation(virtualEnvironment.GetExecutable("pip")), ResourceAnnotationMutationBehavior.Replace) 1199.WithAnnotation(new PythonInstallCommandAnnotation([.. baseInstallArgs, .. installArgs ?? []]), ResourceAnnotationMutationBehavior.Replace); 1268.WithAnnotation(new PythonPackageManagerAnnotation("uv"), ResourceAnnotationMutationBehavior.Replace) 1269.WithAnnotation(new PythonInstallCommandAnnotation(args), ResourceAnnotationMutationBehavior.Replace); 1389builder.WithAnnotation(new PythonPackageInstallerAnnotation(installer)); 1568builder.WithAnnotation(existing);
Aspire.Hosting.Python.Tests (1)
AddUvicornAppTests.cs (1)
78.WithAnnotation(new ContainerFilesSourceAnnotation() { SourcePath = "/app/dist" });
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
531return builder.WithAnnotation(
Aspire.Hosting.SqlServer (1)
SqlServerBuilderExtensions.cs (1)
209builder.WithAnnotation(new SqlServerCreateDatabaseScriptAnnotation(script));
Aspire.Hosting.Tests (45)
Backchannel\Exec\ProjectResourceExecTests.cs (1)
136.WithAnnotation<IProjectMetadata>(new ProjectMetadata(Directory.GetCurrentDirectory()));
ManifestGenerationTests.cs (9)
566.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 570.WithAnnotation(new ContainerFilesDestinationAnnotation 608.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 609.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 613.WithAnnotation(new ContainerFilesDestinationAnnotation 652.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 655.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 659.WithAnnotation(new ContainerFilesDestinationAnnotation 664.WithAnnotation(new ContainerFilesDestinationAnnotation
ProjectResourceTests.cs (2)
787.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 819.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" });
Publishing\ResourceContainerImageManagerTests.cs (7)
854.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 860.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 891.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 898.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(ctx => 994.WithAnnotation(dockerfileBuildAnnotation); 1005container.WithAnnotation(defaultContainerBuildOptions); 1031.WithAnnotation(new ContainerBuildOptionsCallbackAnnotation(async ctx =>
ResourceCommandServiceTests.cs (2)
39custom.WithAnnotation(new DcpInstancesAnnotation([ 83custom.WithAnnotation(new DcpInstancesAnnotation([
ResourceExecutionConfigurationGathererTests.cs (6)
376.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 405.WithAnnotation(new HttpsCertificateAnnotation 436.WithAnnotation(new HttpsCertificateAnnotation 482.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 518.WithAnnotation(new HttpsCertificateAnnotation { Certificate = cert }) 519.WithAnnotation(new HttpsCertificateConfigurationCallbackAnnotation(ctx =>
ResourceExtensionsTests.cs (12)
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());
Utils\WithAnnotationTests.cs (2)
27.WithAnnotation<DummyAnnotation>(new DummyAnnotation()) 28.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)
281return builder.WithAnnotation(
Aspire.Hosting.Yarp.Tests (10)
AddYarpTests.cs (10)
231.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 249.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 276.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 306.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }); 338.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 339.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 369.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist" }) 370.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets" }); 374.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/dist2" }) 375.WithAnnotation(new ContainerFilesSourceAnnotation { SourcePath = "/app/assets2" });