26 references to WorkloadPhase
Aspire.Hosting.Native.Core (7)
Runtime\DeclarativeApplication.cs (3)
390if (status.Phase is WorkloadPhase.Exited or WorkloadPhase.Failed) 392return status.Phase == WorkloadPhase.Exited && status.ExitCode == 0;
Runtime\ResourceWorkload.cs (4)
55internal sealed record WorkloadStatus(WorkloadPhase Phase, int? ExitCode); 303if (status.Phase is WorkloadPhase.Exited or WorkloadPhase.Failed) 305publish(status.Phase == WorkloadPhase.Exited && status.ExitCode == 0 ? ResourceState.Stopped : ResourceState.Failed, null);
Aspire.Hosting.Native.Core.Tests (15)
DeclarativeApplicationTests.cs (5)
236StatusForPlan = plan => new(WorkloadPhase.Exited, plan.Arguments.SequenceEqual(["initialize"]) ? 1 : 0) 301StatusForPlan = plan => new(plan is ContainerWorkload ? WorkloadPhase.Running : WorkloadPhase.Exited, 1), 353StatusForPlan = plan => new(plan is ContainerWorkload ? WorkloadPhase.Running : WorkloadPhase.Exited, 0)
NativeProtocolParsingTests.cs (4)
130Assert.Equal(WorkloadPhase.Running, DcpStates.Observe(new() { State = DcpProcessState.Running }).Phase); 131Assert.Equal(WorkloadPhase.Pending, DcpStates.Observe(new() { State = DcpProcessState.Paused }).Phase); 132Assert.Equal(WorkloadPhase.Exited, DcpStates.Observe(new() { State = DcpProcessState.Terminated }).Phase); 133Assert.Equal(WorkloadPhase.Failed, DcpStates.Observe(new() { State = DcpProcessState.FailedToStart, ExitCode = 0 }).Phase);
NativeProviderLifecycleTests.cs (3)
573return new(WorkloadPhase.Running, null); 636StatusForPlan = plan => new(plan is ContainerWorkload ? WorkloadPhase.Running : WorkloadPhase.Exited, 0)
NativeTimeProviderTests.cs (1)
233executor.Phase = WorkloadPhase.Failed;
TestServices\WorkloadTestExecutor.cs (2)
26public WorkloadPhase Phase { get; set; } = WorkloadPhase.Running;
Aspire.Hosting.Native.Server (4)
Dcp\DcpStates.cs (4)
75DcpProcessState.Running => new(WorkloadPhase.Running, status.ExitCode), 76DcpProcessState.Exited or DcpProcessState.Finished or DcpProcessState.Terminated => new(WorkloadPhase.Exited, status.ExitCode), 77DcpProcessState.FailedToStart => new(WorkloadPhase.Failed, status.ExitCode), 79DcpProcessState.Stopping or DcpProcessState.RuntimeUnhealthy => new(WorkloadPhase.Pending, status.ExitCode),