51 references to WaitType
Aspire.Hosting (17)
ApplicationModel\ResourceNotificationService.cs (8)
149
using var activity = ProfilingTelemetry.StartResourceWaitForDependency(Configuration, resource, dependency,
WaitType
.WaitUntilHealthy, waitBehavior);
329
using var activity = ProfilingTelemetry.StartResourceWaitForDependency(Configuration, resource, dependency,
WaitType
.WaitForCompletion, waitBehavior: null);
479
using var activity = ProfilingTelemetry.StartResourceWaitForDependency(Configuration, resource, dependency,
WaitType
.WaitUntilStarted, waitBehavior);
530
waitAnnotation.WaitType ==
WaitType
.WaitForCompletion ? waitAnnotation.ExitCode : 0,
531
waitAnnotation.WaitType ==
WaitType
.WaitForCompletion ? (WaitBehavior?)null : waitAnnotation.WaitBehavior ?? DefaultWaitBehavior))
592
WaitType
.WaitUntilHealthy => WaitUntilHealthyAsync(resource, waitAnnotation.Resource, waitAnnotation.WaitBehavior ?? DefaultWaitBehavior, cancellationToken, OnDependencyReadyAsync),
593
WaitType
.WaitForCompletion => WaitUntilCompletionAsync(resource, waitAnnotation.Resource, waitAnnotation.ExitCode, cancellationToken, OnDependencyReadyAsync),
594
WaitType
.WaitUntilStarted => WaitUntilStartedAsync(resource, waitAnnotation.Resource, waitAnnotation.WaitBehavior ?? DefaultWaitBehavior, cancellationToken, OnDependencyReadyAsync),
ApplicationModel\WaitAnnotation.cs (3)
18
public sealed class WaitAnnotation(IResource resource,
WaitType
waitType, int exitCode = 0) : IResourceAnnotation
28
public
WaitType
WaitType { get; } = waitType;
31
/// The behavior of the wait. Only applicable when <see cref="WaitType"/> is <see cref="
WaitType
.WaitUntilHealthy"/>.
Diagnostics\ProfilingTelemetry.cs (2)
483
public static ActivityScope StartResourceWaitForDependency(IConfiguration? configuration, IResource resource, IResource dependency,
WaitType
waitType, WaitBehavior? waitBehavior)
993
public void SetDependencyWait(IResource resource, IResource dependency,
WaitType
waitType, WaitBehavior? waitBehavior)
ResourceBuilderExtensions.cs (3)
2851
return builder.WithAnnotation(new WaitAnnotation(dependency.Resource,
WaitType
.WaitUntilHealthy) { WaitBehavior = waitBehavior });
2984
return builder.WithAnnotation(new WaitAnnotation(dependency.Resource,
WaitType
.WaitUntilStarted) { WaitBehavior = waitBehavior });
3063
return builder.WithAnnotation(new WaitAnnotation(dependency.Resource,
WaitType
.WaitForCompletion, exitCode));
TerminalResourceBuilderExtensions.cs (1)
264
parent.Annotations.Add(new WaitAnnotation(terminalHosts[i],
WaitType
.WaitUntilStarted));
Aspire.Hosting.Azure.Tests (1)
AzureServiceBusExtensionsTests.cs (1)
978
Assert.Equal(
WaitType
.WaitUntilHealthy, wait.WaitType);
Aspire.Hosting.Docker (1)
DockerComposeServiceResource.cs (1)
204
WaitType
.WaitForCompletion => "service_completed_successfully",
Aspire.Hosting.Dotnet (1)
DotnetProjectBuildCoordinator.cs (1)
148
annotation => annotation.WaitType is
WaitType
.WaitForCompletion &&
Aspire.Hosting.Dotnet.Tests (2)
DotnetProjectBuildCoordinatorTests.cs (2)
5195
Assert.Equal(
WaitType
.WaitForCompletion, wait.WaitType);
5211
Assert.Equal(
WaitType
.WaitForCompletion, wait.WaitType);
Aspire.Hosting.MongoDB.Tests (5)
AddMongoDBTests.cs (4)
145
Assert.Equal(
WaitType
.WaitUntilHealthy, wait.WaitType);
177
Assert.Equal(
WaitType
.WaitUntilHealthy, wait.WaitType);
182
Assert.Equal(
WaitType
.WaitUntilHealthy, wait.WaitType);
186
Assert.Equal(
WaitType
.WaitUntilStarted, memberWait.WaitType);
ReplicaSet\AddMongoDBReplicaSetTests.cs (1)
56
Assert.Equal(
WaitType
.WaitUntilStarted, wait.WaitType);
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
832
Assert.Equal(
WaitType
.WaitForCompletion, waitForCompletionAnnotation.WaitType);
Aspire.Hosting.Tests (23)
AddConnectionStringTests.cs (2)
90
Assert.Equal(
WaitType
.WaitUntilStarted, wa.WaitType);
95
Assert.Equal(
WaitType
.WaitUntilStarted, wa.WaitType);
ResourceNotificationTests.cs (18)
520
resource.Annotations.Add(new WaitAnnotation(dependency1,
WaitType
.WaitUntilStarted));
521
resource.Annotations.Add(new WaitAnnotation(dependency2,
WaitType
.WaitUntilStarted));
566
resource.Annotations.Add(new WaitAnnotation(dependency1,
WaitType
.WaitUntilHealthy));
567
resource.Annotations.Add(new WaitAnnotation(dependency2,
WaitType
.WaitUntilHealthy));
595
resource.Annotations.Add(new WaitAnnotation(dependency1,
WaitType
.WaitUntilHealthy));
596
resource.Annotations.Add(new WaitAnnotation(dependency2,
WaitType
.WaitUntilHealthy));
624
resource.Annotations.Add(new WaitAnnotation(dependency1,
WaitType
.WaitUntilHealthy));
625
resource.Annotations.Add(new WaitAnnotation(dependency2,
WaitType
.WaitUntilHealthy));
680
resource.Annotations.Add(new WaitAnnotation(dependency1,
WaitType
.WaitForCompletion));
681
resource.Annotations.Add(new WaitAnnotation(dependency2,
WaitType
.WaitForCompletion));
730
resource.Annotations.Add(new WaitAnnotation(dependency,
WaitType
.WaitUntilStarted));
773
resource.Annotations.Add(new WaitAnnotation(dependency,
WaitType
.WaitUntilStarted));
806
resource.Annotations.Add(new WaitAnnotation(dependency,
WaitType
.WaitUntilStarted));
848
resource.Annotations.Add(new WaitAnnotation(dependency,
WaitType
.WaitUntilStarted));
881
resource.Annotations.Add(new WaitAnnotation(dependency,
WaitType
.WaitUntilStarted));
920
resource.Annotations.Add(new WaitAnnotation(dependency,
WaitType
.WaitUntilStarted));
957
resource.Annotations.Add(new WaitAnnotation(dependency,
WaitType
.WaitUntilStarted));
1056
resource.Annotations.Add(new WaitAnnotation(dependency,
WaitType
.WaitUntilStarted));
WaitForTests.cs (2)
908
Assert.Equal(
WaitType
.WaitUntilStarted, waitAnnotation.WaitType);
924
Assert.Equal(
WaitType
.WaitUntilStarted, waitAnnotation.WaitType);
WithTerminalTests.cs (1)
262
Assert.Equal(
WaitType
.WaitUntilStarted, single.WaitType);