From 4b3a0fdde074d541e6f6685cead333306c034d11 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Tue, 7 Apr 2026 16:18:16 +0300 Subject: [PATCH] chore: renamed task completion status names --- Engine.Core/Systems/Yields/WaitForTaskYield.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Engine.Core/Systems/Yields/WaitForTaskYield.cs b/Engine.Core/Systems/Yields/WaitForTaskYield.cs index de3e972..beb08b3 100644 --- a/Engine.Core/Systems/Yields/WaitForTaskYield.cs +++ b/Engine.Core/Systems/Yields/WaitForTaskYield.cs @@ -4,20 +4,20 @@ using static Engine.Core.WaitForTaskYield; namespace Engine.Core; -public class WaitForTaskYield(Task task, TaskCompletionStatus completionStatus = TaskCompletionStatus.Either) : ICoroutineYield +public class WaitForTaskYield(Task task, TaskCompletionStatus completionStatus = TaskCompletionStatus.Any) : ICoroutineYield { public bool Yield() { switch (completionStatus) { - case TaskCompletionStatus.Successful: + case TaskCompletionStatus.Success: if (task.IsCanceled) throw new("Task has been canceled."); if (task.IsFaulted) throw task.Exception ?? new("Task has faulted."); return !task.IsCompletedSuccessfully; - case TaskCompletionStatus.Failed: + case TaskCompletionStatus.Fail: if (task.IsCompletedSuccessfully) throw new("Task was completed successfully."); return !task.IsFaulted; @@ -28,8 +28,8 @@ public class WaitForTaskYield(Task task, TaskCompletionStatus completionStatus = public enum TaskCompletionStatus { - Either, - Successful, - Failed + Any, + Success, + Fail } }