18 instantiations of WaitAnnotation
Aspire.Hosting (4)
ResourceBuilderExtensions.cs (3)
2460return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilHealthy) { WaitBehavior = waitBehavior }); 2593return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitUntilStarted) { WaitBehavior = waitBehavior }); 2672return builder.WithAnnotation(new WaitAnnotation(dependency.Resource, WaitType.WaitForCompletion, exitCode));
TerminalResourceBuilderExtensions.cs (1)
301parent.Annotations.Add(new WaitAnnotation(terminalHosts[i], WaitType.WaitUntilStarted));
Aspire.Hosting.Tests (14)
ResourceNotificationTests.cs (14)
363resource.Annotations.Add(new WaitAnnotation(dependency1, WaitType.WaitUntilStarted)); 364resource.Annotations.Add(new WaitAnnotation(dependency2, WaitType.WaitUntilStarted)); 411resource.Annotations.Add(new WaitAnnotation(dependency1, WaitType.WaitUntilHealthy)); 412resource.Annotations.Add(new WaitAnnotation(dependency2, WaitType.WaitUntilHealthy)); 467resource.Annotations.Add(new WaitAnnotation(dependency1, WaitType.WaitForCompletion)); 468resource.Annotations.Add(new WaitAnnotation(dependency2, WaitType.WaitForCompletion)); 517resource.Annotations.Add(new WaitAnnotation(dependency, WaitType.WaitUntilStarted)); 560resource.Annotations.Add(new WaitAnnotation(dependency, WaitType.WaitUntilStarted)); 593resource.Annotations.Add(new WaitAnnotation(dependency, WaitType.WaitUntilStarted)); 635resource.Annotations.Add(new WaitAnnotation(dependency, WaitType.WaitUntilStarted)); 668resource.Annotations.Add(new WaitAnnotation(dependency, WaitType.WaitUntilStarted)); 707resource.Annotations.Add(new WaitAnnotation(dependency, WaitType.WaitUntilStarted)); 744resource.Annotations.Add(new WaitAnnotation(dependency, WaitType.WaitUntilStarted)); 843resource.Annotations.Add(new WaitAnnotation(dependency, WaitType.WaitUntilStarted));
56 references to WaitAnnotation
Aspire.Hosting (8)
ApplicationModel\ResourceExtensions.cs (5)
1469/// <item>Wait dependencies via <see cref="WaitAnnotation"/></item> 1506/// <item>Wait dependencies via <see cref="WaitAnnotation"/></item> 1538/// <item>Wait dependencies via <see cref="WaitAnnotation"/></item> 1752if (resource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations)) 1754foreach (var waitAnnotation in waitAnnotations)
ApplicationModel\ResourceNotificationService.cs (1)
478if (!resource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations))
ApplicationModel\WaitAnnotation.cs (1)
15/// The holder of this annotation is waiting on the resource in the <see cref="WaitAnnotation.Resource"/> property.
Orchestrator\ApplicationOrchestrator.cs (1)
123if (!@event.Resource.HasAnnotationOfType<WaitAnnotation>())
Aspire.Hosting.Docker (2)
DockerComposeServiceResource.cs (2)
185if (TargetResource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations)) 187foreach (var waitAnnotation in waitAnnotations)
Aspire.Hosting.EntityFrameworkCore (1)
EFMigrationResourceBuilderExtensions.cs (1)
372candidates = CollectConnectionStringCandidates<WaitAnnotation>(
Aspire.Hosting.EntityFrameworkCore.Tests (14)
EFMigrationPipelineTests.cs (4)
237var waitAnnotations = migrations.Resource.Annotations.OfType<WaitAnnotation>().ToList(); 257var waitAnnotations = migrations.Resource.Annotations.OfType<WaitAnnotation>().ToList(); 269var waitAnnotations = migrations.Resource.Annotations.OfType<WaitAnnotation>().ToList(); 676var waitedResources = migrations.Resource.Annotations.OfType<WaitAnnotation>().Select(w => w.Resource).ToList();
EFMigrationWaitForTests.cs (10)
24var waitAnnotation = anotherProject.Resource.Annotations.OfType<WaitAnnotation>().FirstOrDefault(); 41var wait1 = project1.Resource.Annotations.OfType<WaitAnnotation>().FirstOrDefault(w => w.Resource == migrations.Resource); 42var wait2 = project2.Resource.Annotations.OfType<WaitAnnotation>().FirstOrDefault(w => w.Resource == migrations.Resource); 60var waitAnnotations = anotherProject.Resource.Annotations.OfType<WaitAnnotation>().ToList(); 77Assert.NotNull(anotherProject.Resource.Annotations.OfType<WaitAnnotation>().FirstOrDefault()); 90var waitAnnotation = container.Resource.Annotations.OfType<WaitAnnotation>().FirstOrDefault();
Aspire.Hosting.Foundry.Tests (1)
HostedAgentExtensionTests.cs (1)
658Assert.Contains(app.Resource.Annotations.OfType<WaitAnnotation>(), w => ReferenceEquals(w.Resource, project.Resource));
Aspire.Hosting.Go.Tests (3)
AddGoAppTests.cs (3)
1107vendorResource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations), 1124downloadResource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations)); 1141downloadResource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations));
Aspire.Hosting.Java (1)
JavaHostingExtensions.cs (1)
920annotation is WaitAnnotation wait && ReferenceEquals(wait.Resource, buildResource)
Aspire.Hosting.Java.Tests (6)
AddJavaAppTests.cs (1)
1261Assert.Empty(app.Resource.Annotations.OfType<WaitAnnotation>());
AddQuarkusAppTests.cs (3)
35app.Resource.Annotations.OfType<WaitAnnotation>(), 51Assert.Empty(app.Resource.Annotations.OfType<WaitAnnotation>()); 68Assert.Empty(app.Resource.Annotations.OfType<WaitAnnotation>());
AddSpringBootAppTests.cs (2)
301app.Resource.Annotations.OfType<WaitAnnotation>(), 324Assert.Empty(app.Resource.Annotations.OfType<WaitAnnotation>());
Aspire.Hosting.JavaScript (1)
JavaScriptHostingExtensions.cs (1)
2344resource.Resource.Annotations.OfType<WaitAnnotation>()
Aspire.Hosting.JavaScript.Tests (5)
IntegrationTests.cs (1)
50Assert.True(nodeApp.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations));
PackageInstallationTests.cs (1)
74Assert.False(nodeResource.TryGetAnnotationsOfType<WaitAnnotation>(out _));
ResourceCreationTests.cs (3)
122Assert.True(nodeResource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations)); 123var waitAnnotation = Assert.Single(waitAnnotations); 190Assert.False(nodeResource.TryGetAnnotationsOfType<WaitAnnotation>(out _));
Aspire.Hosting.Python.Tests (6)
AddPythonAppTests.cs (6)
795var waitAnnotations = pythonAppResource.Annotations.OfType<WaitAnnotation>(); 796var waitForCompletionAnnotation = Assert.Single(waitAnnotations); 2270var installerWaits = installerResource.Annotations.OfType<WaitAnnotation>() 2370var installerWaits = installerResource.Annotations.OfType<WaitAnnotation>() 2500var waitAnnotations = pythonAppResource.Annotations.OfType<WaitAnnotation>().ToList(); 2533var waitAnnotations = pythonAppResource.Annotations.OfType<WaitAnnotation>().ToList();
Aspire.Hosting.Tests (8)
AddConnectionStringTests.cs (1)
82cs.Resource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations);
WaitForTests.cs (5)
787Assert.True(containerResource.Resource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations)); 809Assert.True(resource.Resource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations)); 810var waitAnnotation = Assert.Single(waitAnnotations); 825Assert.True(resource.Resource.TryGetAnnotationsOfType<WaitAnnotation>(out var waitAnnotations)); 826var waitAnnotation = Assert.Single(waitAnnotations);
WithTerminalTests.cs (2)
175var waitAnnotations = resource.Resource.Annotations.OfType<WaitAnnotation>() 178var single = Assert.Single(waitAnnotations);