From c930f5d7b7cd214b6e198b652be49e4fe6fec282 Mon Sep 17 00:00:00 2001 From: lujiajian <204551278@qq.com> Date: Wed, 5 Nov 2025 14:07:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E7=9B=B4=E5=8D=A1?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UniTask/Editor/UniTaskTrackerWindow.cs | 15 +- .../Plugins/UniTask/Runtime/AsyncLazy.cs | 26 - .../UniTask/Runtime/AsyncReactiveProperty.cs | 30 +- .../Plugins/UniTask/Runtime/AsyncUnit.cs | 5 - .../Runtime/CancellationTokenExtensions.cs | 6 +- .../Runtime/EnumeratorAsyncExtensions.cs | 4 - .../UniTask/Runtime/Internal/ArrayPool.cs | 4 +- .../Runtime/Internal/ContinuationQueue.cs | 6 +- .../UniTask/Runtime/Internal/MinimumQueue.cs | 2 +- .../Runtime/Internal/PlayerLoopRunner.cs | 12 +- .../UniTask/Runtime/Internal/StatePool.cs | 36 +- .../Runtime/Internal/WeakDictionary.cs | 12 +- .../Runtime/Linq/AsyncEnumeratorBase.cs | 32 - .../UniTask/Runtime/Linq/CombineLatest.cs | 5845 ++--------------- .../Plugins/UniTask/Runtime/Linq/Create.cs | 14 - .../Runtime/Linq/DistinctUntilChanged.cs | 56 - .../Plugins/UniTask/Runtime/Linq/Empty.cs | 2 +- .../Plugins/UniTask/Runtime/Linq/Publish.cs | 10 - .../Plugins/UniTask/Runtime/Linq/Range.cs | 2 +- .../Plugins/UniTask/Runtime/Linq/Subscribe.cs | 137 +- .../Linq/UnityExtensions/EveryValueChanged.cs | 38 - 3d/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs | 87 - .../UniTask/Runtime/PlayerLoopHelper.cs | 6 +- .../UniTask/Runtime/PlayerLoopTimer.cs | 20 +- 3d/Assets/Plugins/UniTask/Runtime/TaskPool.cs | 6 +- .../Plugins/UniTask/Runtime/TriggerEvent.cs | 60 +- .../Plugins/UniTask/Runtime/UniTask.Delay.cs | 2 +- .../Runtime/UniTask.WhenAll.Generated.cs | 1904 ------ .../Runtime/UniTask.WhenAny.Generated.cs | 1904 ------ .../Runtime/UniTaskCompletionSource.cs | 4 +- .../Runtime/UniTaskObservableExtensions.cs | 55 +- .../UniTask/Runtime/UniTaskScheduler.cs | 70 +- .../Runtime/UniTaskSynchronizationContext.cs | 6 +- .../Plugins/UniTask/Runtime/UniTaskVoid.cs | 1 - .../UniTask/Runtime/UnityAsyncExtensions.cs | 6 +- .../Runtime/UnityAsyncExtensions.uGUI.cs | 27 +- 36 files changed, 794 insertions(+), 9658 deletions(-) diff --git a/3d/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs b/3d/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs index c58472f..242ac6d 100644 --- a/3d/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs +++ b/3d/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs @@ -68,8 +68,7 @@ namespace Cysharp.Threading.Tasks.Editor public static bool EnableStackTrace => TaskTracker.EditorEnableState.EnableStackTrace; static readonly GUIContent EnableAutoReloadHeadContent = EditorGUIUtility.TrTextContent("Enable AutoReload", "Reload automatically.", (Texture)null); static readonly GUIContent ReloadHeadContent = EditorGUIUtility.TrTextContent("Reload", "Reload View.", (Texture)null); - // GC.Collect 按钮已移除,避免频繁强制垃圾回收影响性能 - // static readonly GUIContent GCHeadContent = EditorGUIUtility.TrTextContent("GC.Collect", "Invoke GC.Collect.", (Texture)null); + static readonly GUIContent GCHeadContent = EditorGUIUtility.TrTextContent("GC.Collect", "Invoke GC.Collect.", (Texture)null); static readonly GUIContent EnableTrackingHeadContent = EditorGUIUtility.TrTextContent("Enable Tracking", "Start to track async/await UniTask. Performance impact: low", (Texture)null); static readonly GUIContent EnableStackTraceHeadContent = EditorGUIUtility.TrTextContent("Enable StackTrace", "Capture StackTrace when task is started. Performance impact: high", (Texture)null); @@ -103,14 +102,10 @@ namespace Cysharp.Threading.Tasks.Editor Repaint(); } - // 移除 GC.Collect() 调用,避免频繁强制垃圾回收影响性能 - // .NET 的垃圾回收器会自动管理内存,不需要手动调用 GC.Collect() - // 如果确实需要释放内存,应使用 using 语句或 IDisposable 接口释放非托管资源 - // 注意:此按钮已移除,如需调试内存问题,请使用 Unity Profiler - // if (GUILayout.Button(GCHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption)) - // { - // GC.Collect(0); - // } + if (GUILayout.Button(GCHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption)) + { + GC.Collect(0); + } EditorGUILayout.EndHorizontal(); EditorGUILayout.EndVertical(); diff --git a/3d/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs b/3d/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs index 7473639..51bfadc 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs @@ -99,19 +99,6 @@ namespace Cysharp.Threading.Tasks awaiter.GetResult(); completionSource.TrySetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - completionSource.TrySetException(ex); - } - catch (ObjectDisposedException ex) - { - completionSource.TrySetException(ex); - } - catch (InvalidOperationException ex) - { - completionSource.TrySetException(ex); - } catch (Exception ex) { completionSource.TrySetException(ex); @@ -231,19 +218,6 @@ namespace Cysharp.Threading.Tasks var result = awaiter.GetResult(); completionSource.TrySetResult(result); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - completionSource.TrySetException(ex); - } - catch (ObjectDisposedException ex) - { - completionSource.TrySetException(ex); - } - catch (InvalidOperationException ex) - { - completionSource.TrySetException(ex); - } catch (Exception ex) { completionSource.TrySetException(ex); diff --git a/3d/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs b/3d/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs index 61f4e7c..a08844d 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/AsyncReactiveProperty.cs @@ -56,17 +56,7 @@ namespace Cysharp.Threading.Tasks public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - // 释放托管资源 - triggerEvent.SetCompleted(); - } + triggerEvent.SetCompleted(); } public static implicit operator T(AsyncReactiveProperty value) @@ -379,22 +369,12 @@ namespace Cysharp.Threading.Tasks public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) + if (enumerator != null) { - // 释放托管资源 - if (enumerator != null) - { - enumerator.DisposeAsync().Forget(); - } - - triggerEvent.SetCompleted(); + enumerator.DisposeAsync().Forget(); } + + triggerEvent.SetCompleted(); } public static implicit operator T(ReadOnlyAsyncReactiveProperty value) diff --git a/3d/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs b/3d/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs index 59d6dc1..1d4bc74 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/AsyncUnit.cs @@ -13,11 +13,6 @@ namespace Cysharp.Threading.Tasks return 0; } - public override bool Equals(object obj) - { - return base.Equals(obj); - } - public bool Equals(AsyncUnit other) { return true; diff --git a/3d/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs b/3d/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs index 80c593b..3f3a532 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/CancellationTokenExtensions.cs @@ -163,9 +163,9 @@ namespace Cysharp.Threading.Tasks public bool IsCompleted => !cancellationToken.CanBeCanceled || cancellationToken.IsCancellationRequested; - - - + public void GetResult() + { + } public void OnCompleted(Action continuation) { diff --git a/3d/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs b/3d/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs index 832a4e8..785bbc2 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/EnumeratorAsyncExtensions.cs @@ -222,10 +222,6 @@ namespace Cysharp.Threading.Tasks case WaitForSeconds wfs: innerCoroutine = UnwrapWaitForSeconds(wfs); break; - default: - // 未知的YieldInstruction类型,设为null以便后续处理 - innerCoroutine = null; - break; } if (innerCoroutine != null) { diff --git a/3d/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs b/3d/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs index ded0647..e1d9d3b 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Internal/ArrayPool.cs @@ -59,7 +59,7 @@ namespace Cysharp.Threading.Tasks.Internal } finally { - + if (lockTaken) locks[index].Exit(false); } } @@ -97,7 +97,7 @@ namespace Cysharp.Threading.Tasks.Internal } finally { - + if (lockTaken) locks[index].Exit(false); } } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs b/3d/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs index 9a1202c..a311126 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Internal/ContinuationQueue.cs @@ -66,7 +66,7 @@ namespace Cysharp.Threading.Tasks.Internal } finally { - + if (lockTaken) gate.Exit(false); } } @@ -180,7 +180,7 @@ namespace Cysharp.Threading.Tasks.Internal } finally { - + if (lockTaken) gate.Exit(false); } } @@ -216,7 +216,7 @@ namespace Cysharp.Threading.Tasks.Internal } finally { - gate.Exit(false); + if (lockTaken) gate.Exit(false); } } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs b/3d/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs index b6f8f58..a6b567a 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Internal/MinimumQueue.cs @@ -18,7 +18,7 @@ namespace Cysharp.Threading.Tasks.Internal public MinimumQueue(int capacity) { - if (capacity < 0)throw new ArgumentOutOfRangeException("capacity"); + if (capacity < 0) throw new ArgumentOutOfRangeException("capacity"); array = new T[capacity]; head = tail = size = 0; } diff --git a/3d/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs b/3d/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs index 7b2e10a..43625ab 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs @@ -188,11 +188,7 @@ namespace Cysharp.Threading.Tasks.Internal { unhandledExceptionCallback(ex); } - catch (Exception callbackEx) - { - // 记录异常回调本身也抛出异常的情况,避免异常被静默忽略 - Debug.LogError($"PlayerLoopRunner: 异常回调函数执行失败 - {callbackEx.Message}\n原始异常: {ex.Message}\n回调异常堆栈: {callbackEx.StackTrace}"); - } + catch { } } } @@ -227,11 +223,7 @@ namespace Cysharp.Threading.Tasks.Internal { unhandledExceptionCallback(ex); } - catch (Exception callbackEx) - { - // 记录异常回调本身也抛出异常的情况,避免异常被静默忽略 - Debug.LogError($"PlayerLoopRunner: 异常回调函数执行失败 - {callbackEx.Message}\n原始异常: {ex.Message}\n回调异常堆栈: {callbackEx.StackTrace}"); - } + catch { } continue; // next j } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs b/3d/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs index 3c94126..e1d40bd 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Internal/StatePool.cs @@ -33,17 +33,7 @@ namespace Cysharp.Threading.Tasks.Internal public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - // 释放托管资源 - StatePool.Return(this); - } + StatePool.Return(this); } } @@ -84,17 +74,7 @@ namespace Cysharp.Threading.Tasks.Internal public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - // 释放托管资源 - StatePool.Return(this); - } + StatePool.Return(this); } } @@ -139,17 +119,7 @@ namespace Cysharp.Threading.Tasks.Internal public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - // 释放托管资源 - StatePool.Return(this); - } + StatePool.Return(this); } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs b/3d/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs index 63bc3bc..3feaad8 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Internal/WeakDictionary.cs @@ -231,14 +231,14 @@ namespace Cysharp.Threading.Tasks.Internal // avoid allocate everytime. public int ToList(ref List> list, bool clear = true) { - - - - + if (clear) + { + list.Clear(); + } var listIndex = 0; - + bool lockTaken = false; try { for (int i = 0; i < buckets.Length; i++) @@ -271,7 +271,7 @@ namespace Cysharp.Threading.Tasks.Internal } finally { - gate.Exit(false); + if (lockTaken) gate.Exit(false); } return listIndex; diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs index 1a4be31..e7f9968 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs @@ -70,22 +70,6 @@ namespace Cysharp.Threading.Tasks.Linq goto CONTINUE; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - completionSource.TrySetException(ex); - return; - } catch (Exception ex) { completionSource.TrySetException(ex); @@ -233,22 +217,6 @@ namespace Cysharp.Threading.Tasks.Linq completionSource.TrySetResult(result); } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - completionSource.TrySetException(ex); - return; - } catch (Exception ex) { completionSource.TrySetException(ex); diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs index f817e99..92fb1da 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs @@ -359,28 +359,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -398,31 +376,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -455,28 +414,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -494,31 +431,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -716,28 +634,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -755,31 +651,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -812,28 +689,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -851,31 +706,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -908,28 +744,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -947,31 +761,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -1198,28 +993,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -1237,31 +1010,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -1294,28 +1048,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -1333,31 +1065,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -1390,28 +1103,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -1429,31 +1120,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -1486,28 +1158,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -1525,31 +1175,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -1805,28 +1436,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -1844,31 +1453,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -1901,28 +1491,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -1940,31 +1508,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -1997,28 +1546,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -2036,31 +1563,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -2093,28 +1601,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -2132,31 +1618,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -2189,28 +1656,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -2228,31 +1673,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -2537,28 +1963,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -2576,31 +1980,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -2633,28 +2018,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -2672,31 +2035,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -2729,28 +2073,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -2768,31 +2090,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -2825,28 +2128,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -2864,31 +2145,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -2921,28 +2183,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -2960,31 +2200,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -3017,28 +2238,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -3056,31 +2255,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -3394,28 +2574,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -3433,31 +2591,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -3490,28 +2629,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -3529,31 +2646,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -3586,28 +2684,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -3625,31 +2701,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -3682,28 +2739,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -3721,31 +2756,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -3778,28 +2794,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -3817,31 +2811,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -3874,28 +2849,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -3913,31 +2866,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -3970,28 +2904,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running7 = true; // as complete, no more call MoveNextAsync. @@ -4009,31 +2921,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -4376,28 +3269,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -4415,31 +3286,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -4472,28 +3324,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -4511,31 +3341,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -4568,28 +3379,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -4607,31 +3396,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -4664,28 +3434,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -4703,31 +3451,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -4760,28 +3489,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -4799,31 +3506,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -4856,28 +3544,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -4895,31 +3561,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -4952,28 +3599,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running7 = true; // as complete, no more call MoveNextAsync. @@ -4991,31 +3616,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -5048,28 +3654,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running8 = true; // as complete, no more call MoveNextAsync. @@ -5087,31 +3671,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -5483,28 +4048,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -5522,31 +4065,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -5579,28 +4103,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -5618,31 +4120,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -5675,28 +4158,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -5714,31 +4175,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -5771,28 +4213,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -5810,31 +4230,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -5867,28 +4268,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -5906,31 +4285,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -5963,28 +4323,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -6002,31 +4340,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -6059,28 +4378,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running7 = true; // as complete, no more call MoveNextAsync. @@ -6098,31 +4395,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -6155,28 +4433,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running8 = true; // as complete, no more call MoveNextAsync. @@ -6194,31 +4450,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -6251,28 +4488,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running9 = true; // as complete, no more call MoveNextAsync. @@ -6290,31 +4505,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -6715,28 +4911,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -6754,31 +4928,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -6811,28 +4966,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -6850,31 +4983,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -6907,28 +5021,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -6946,31 +5038,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -7003,28 +5076,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -7042,31 +5093,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -7099,28 +5131,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -7138,31 +5148,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -7195,28 +5186,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -7234,31 +5203,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -7291,28 +5241,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running7 = true; // as complete, no more call MoveNextAsync. @@ -7330,31 +5258,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -7387,28 +5296,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running8 = true; // as complete, no more call MoveNextAsync. @@ -7426,31 +5313,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -7483,28 +5351,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running9 = true; // as complete, no more call MoveNextAsync. @@ -7522,31 +5368,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -7596,31 +5423,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -8050,28 +5858,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -8089,31 +5875,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -8146,28 +5913,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -8185,31 +5930,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -8242,28 +5968,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -8281,31 +5985,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -8338,28 +6023,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -8377,31 +6040,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -8434,28 +6078,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -8473,31 +6095,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -8530,28 +6133,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -8569,31 +6150,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -8626,28 +6188,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running7 = true; // as complete, no more call MoveNextAsync. @@ -8665,31 +6205,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -8722,28 +6243,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running8 = true; // as complete, no more call MoveNextAsync. @@ -8761,31 +6260,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -8818,28 +6298,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running9 = true; // as complete, no more call MoveNextAsync. @@ -8857,31 +6315,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -8931,31 +6370,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -9005,31 +6425,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -9488,28 +6889,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -9527,31 +6906,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -9584,28 +6944,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -9623,31 +6961,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -9680,28 +6999,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -9719,31 +7016,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -9776,28 +7054,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -9815,31 +7071,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -9872,28 +7109,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -9911,31 +7126,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -9968,28 +7164,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -10007,31 +7181,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -10064,28 +7219,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running7 = true; // as complete, no more call MoveNextAsync. @@ -10103,31 +7236,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -10160,28 +7274,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running8 = true; // as complete, no more call MoveNextAsync. @@ -10199,31 +7291,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -10256,28 +7329,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running9 = true; // as complete, no more call MoveNextAsync. @@ -10295,31 +7346,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -10369,31 +7401,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -10443,31 +7456,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -10517,31 +7511,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter12.SourceOnCompleted(Completed12Delegate, self); } @@ -11029,28 +8004,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -11068,31 +8021,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -11125,28 +8059,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -11164,31 +8076,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -11221,28 +8114,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -11260,31 +8131,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -11317,28 +8169,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -11356,31 +8186,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -11413,28 +8224,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -11452,31 +8241,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -11509,28 +8279,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -11548,31 +8296,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -11605,28 +8334,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running7 = true; // as complete, no more call MoveNextAsync. @@ -11644,31 +8351,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -11701,28 +8389,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running8 = true; // as complete, no more call MoveNextAsync. @@ -11740,31 +8406,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -11797,28 +8444,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running9 = true; // as complete, no more call MoveNextAsync. @@ -11836,31 +8461,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -11910,31 +8516,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -11984,31 +8571,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -12058,31 +8626,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter12.SourceOnCompleted(Completed12Delegate, self); } @@ -12132,31 +8681,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter13 = self.enumerator13.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter13.SourceOnCompleted(Completed13Delegate, self); } @@ -12673,28 +9203,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -12712,31 +9220,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -12769,28 +9258,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -12808,31 +9275,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -12865,28 +9313,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -12904,31 +9330,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -12961,28 +9368,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -13000,31 +9385,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -13057,28 +9423,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -13096,31 +9440,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -13153,28 +9478,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -13192,31 +9495,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -13249,28 +9533,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running7 = true; // as complete, no more call MoveNextAsync. @@ -13288,31 +9550,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -13345,28 +9588,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running8 = true; // as complete, no more call MoveNextAsync. @@ -13384,31 +9605,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -13441,28 +9643,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running9 = true; // as complete, no more call MoveNextAsync. @@ -13480,31 +9660,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -13554,31 +9715,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -13628,31 +9770,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -13702,31 +9825,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter12.SourceOnCompleted(Completed12Delegate, self); } @@ -13776,31 +9880,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter13 = self.enumerator13.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter13.SourceOnCompleted(Completed13Delegate, self); } @@ -13850,31 +9935,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter14 = self.enumerator14.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter14.SourceOnCompleted(Completed14Delegate, self); } @@ -14420,28 +10486,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running1 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running1 = true; // as complete, no more call MoveNextAsync. @@ -14459,31 +10503,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -14516,28 +10541,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running2 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running2 = true; // as complete, no more call MoveNextAsync. @@ -14555,31 +10558,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -14612,28 +10596,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running3 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running3 = true; // as complete, no more call MoveNextAsync. @@ -14651,31 +10613,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -14708,28 +10651,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running4 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running4 = true; // as complete, no more call MoveNextAsync. @@ -14747,31 +10668,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -14804,28 +10706,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running5 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running5 = true; // as complete, no more call MoveNextAsync. @@ -14843,31 +10723,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -14900,28 +10761,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running6 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running6 = true; // as complete, no more call MoveNextAsync. @@ -14939,31 +10778,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -14996,28 +10816,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running7 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running7 = true; // as complete, no more call MoveNextAsync. @@ -15035,31 +10833,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -15092,28 +10871,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running8 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running8 = true; // as complete, no more call MoveNextAsync. @@ -15131,31 +10888,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -15188,28 +10926,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.running9 = true; // as complete, no more call MoveNextAsync. - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.running9 = true; // as complete, no more call MoveNextAsync. @@ -15227,31 +10943,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -15301,31 +10998,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -15375,31 +11053,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -15449,31 +11108,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter12.SourceOnCompleted(Completed12Delegate, self); } @@ -15523,31 +11163,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter13 = self.enumerator13.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter13.SourceOnCompleted(Completed13Delegate, self); } @@ -15597,31 +11218,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter14 = self.enumerator14.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter14.SourceOnCompleted(Completed14Delegate, self); } @@ -15671,31 +11273,12 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter15 = self.enumerator15.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + catch (Exception ex) + { + self.completedCount = CompleteCount; + self.completionSource.TrySetException(ex); + return; + } self.awaiter15.SourceOnCompleted(Completed15Delegate, self); } diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/Create.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/Create.cs index 84926c3..fa34774 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Create.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Create.cs @@ -109,20 +109,6 @@ namespace Cysharp.Threading.Tasks.Linq await task; goto DONE; } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - Volatile.Write(ref state, -2); - completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - Volatile.Write(ref state, -2); - completionSource.TrySetException(ex); - return; - } - catch (Exception ex) { Volatile.Write(ref state, -2); diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs index 4f30e84..d91bef9 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs @@ -175,20 +175,6 @@ namespace Cysharp.Threading.Tasks.Linq goto DONE; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - state = -2; - completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - state = -2; - completionSource.TrySetException(ex); - return; - } - catch (Exception ex) { state = -2; @@ -333,20 +319,6 @@ namespace Cysharp.Threading.Tasks.Linq goto DONE; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - state = -2; - completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - state = -2; - completionSource.TrySetException(ex); - return; - } - catch (Exception ex) { state = -2; @@ -505,20 +477,6 @@ namespace Cysharp.Threading.Tasks.Linq goto DONE; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - state = -2; - completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - state = -2; - completionSource.TrySetException(ex); - return; - } - catch (Exception ex) { state = -2; @@ -677,20 +635,6 @@ namespace Cysharp.Threading.Tasks.Linq goto DONE; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - state = -2; - completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - state = -2; - completionSource.TrySetException(ex); - return; - } - catch (Exception ex) { state = -2; diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs index afcb73f..2f5b3a4 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Empty.cs @@ -15,7 +15,7 @@ namespace Cysharp.Threading.Tasks.Linq public static readonly IUniTaskAsyncEnumerable Instance = new Empty(); Empty() - {UnityEngine.Debug.Log("Empty created"); + { } public IUniTaskAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs index 5dc2895..d218c0f 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs @@ -57,16 +57,6 @@ namespace Cysharp.Threading.Tasks.Linq } trigger.SetCompleted(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为错误状态 - trigger.SetError(ex); - } - catch (InvalidOperationException ex) - { - trigger.SetError(ex); - } - catch (Exception ex) { trigger.SetError(ex); diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/Range.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/Range.cs index 5caf128..24a795d 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Range.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Range.cs @@ -10,7 +10,7 @@ namespace Cysharp.Threading.Tasks.Linq if (count < 0) throw Error.ArgumentOutOfRange(nameof(count)); var end = (long)start + count - 1L; - throw Error.ArgumentOutOfRange(nameof(count)); + if (end > int.MaxValue) throw Error.ArgumentOutOfRange(nameof(count)); if (count == 0) UniTaskAsyncEnumerable.Empty(); diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs index e0fc2f9..0785bc2 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs @@ -322,29 +322,6 @@ namespace Cysharp.Threading.Tasks.Linq } onCompleted(); } - catch (OperationCanceledException) - { - // 操作被取消,直接返回,不触发错误回调 - return; - } - catch (ObjectDisposedException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } - catch (InvalidOperationException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } catch (Exception ex) { if (onError == NopError) @@ -353,6 +330,8 @@ namespace Cysharp.Threading.Tasks.Linq return; } + if (ex is OperationCanceledException) return; + onError(ex); } finally @@ -382,29 +361,6 @@ namespace Cysharp.Threading.Tasks.Linq } onCompleted(); } - catch (OperationCanceledException) - { - // 操作被取消,直接返回,不触发错误回调 - return; - } - catch (ObjectDisposedException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } - catch (InvalidOperationException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } catch (Exception ex) { if (onError == NopError) @@ -413,6 +369,8 @@ namespace Cysharp.Threading.Tasks.Linq return; } + if (ex is OperationCanceledException) return; + onError(ex); } finally @@ -442,29 +400,6 @@ namespace Cysharp.Threading.Tasks.Linq } onCompleted(); } - catch (OperationCanceledException) - { - // 操作被取消,直接返回,不触发错误回调 - return; - } - catch (ObjectDisposedException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } - catch (InvalidOperationException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } catch (Exception ex) { if (onError == NopError) @@ -473,6 +408,8 @@ namespace Cysharp.Threading.Tasks.Linq return; } + if (ex is OperationCanceledException) return; + onError(ex); } finally @@ -502,18 +439,10 @@ namespace Cysharp.Threading.Tasks.Linq } observer.OnCompleted(); } - catch (OperationCanceledException) - { - // 操作被取消,直接返回,不触发错误回调 - return; - } - catch (InvalidOperationException ex) - { - observer.OnError(ex); - } - catch (Exception ex) { + if (ex is OperationCanceledException) return; + observer.OnError(ex); } finally @@ -543,29 +472,6 @@ namespace Cysharp.Threading.Tasks.Linq } onCompleted(); } - catch (OperationCanceledException) - { - // 操作被取消,直接返回,不触发错误回调 - return; - } - catch (ObjectDisposedException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } - catch (InvalidOperationException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } catch (Exception ex) { if (onError == NopError) @@ -574,6 +480,8 @@ namespace Cysharp.Threading.Tasks.Linq return; } + if (ex is OperationCanceledException) return; + onError(ex); } finally @@ -603,29 +511,6 @@ namespace Cysharp.Threading.Tasks.Linq } onCompleted(); } - catch (OperationCanceledException) - { - // 操作被取消,直接返回,不触发错误回调 - return; - } - catch (ObjectDisposedException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } - catch (InvalidOperationException ex) - { - if (onError == NopError) - { - UniTaskScheduler.PublishUnobservedTaskException(ex); - return; - } - onError(ex); - } catch (Exception ex) { if (onError == NopError) @@ -634,6 +519,8 @@ namespace Cysharp.Threading.Tasks.Linq return; } + if (ex is OperationCanceledException) return; + onError(ex); } finally diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs index 360cccc..ef5739c 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs @@ -143,25 +143,6 @@ namespace Cysharp.Threading.Tasks.Linq return true; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - completionSource.TrySetException(ex); - DisposeAsync().Forget(); - return false; - } - catch (InvalidOperationException ex) - { - completionSource.TrySetException(ex); - DisposeAsync().Forget(); - return false; - } - catch (NullReferenceException ex) - { - completionSource.TrySetException(ex); - DisposeAsync().Forget(); - return false; - } catch (Exception ex) { completionSource.TrySetException(ex); @@ -295,25 +276,6 @@ namespace Cysharp.Threading.Tasks.Linq return true; } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - completionSource.TrySetException(ex); - DisposeAsync().Forget(); - return false; - } - catch (InvalidOperationException ex) - { - completionSource.TrySetException(ex); - DisposeAsync().Forget(); - return false; - } - catch (NullReferenceException ex) - { - completionSource.TrySetException(ex); - DisposeAsync().Forget(); - return false; - } catch (Exception ex) { completionSource.TrySetException(ex); diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs index 88daf94..af6d5f1 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs @@ -125,22 +125,6 @@ namespace Cysharp.Threading.Tasks.Linq { self.secondAwaiter = self.secondEnumerator.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.completionSource.TrySetException(ex); @@ -175,19 +159,6 @@ namespace Cysharp.Threading.Tasks.Linq { self.Current = self.resultSelector(self.firstEnumerator.Current, self.secondEnumerator.Current); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completionSource.TrySetException(ex); - } - catch (InvalidOperationException ex) - { - self.completionSource.TrySetException(ex); - } - catch (ArgumentNullException ex) - { - self.completionSource.TrySetException(ex); - } catch (Exception ex) { self.completionSource.TrySetException(ex); @@ -308,22 +279,6 @@ namespace Cysharp.Threading.Tasks.Linq { self.secondAwaiter = self.secondEnumerator.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.completionSource.TrySetException(ex); @@ -366,19 +321,6 @@ namespace Cysharp.Threading.Tasks.Linq self.resultAwaiter.SourceOnCompleted(resultAwaitCoreDelegate, self); } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completionSource.TrySetException(ex); - } - catch (InvalidOperationException ex) - { - self.completionSource.TrySetException(ex); - } - catch (ArgumentNullException ex) - { - self.completionSource.TrySetException(ex); - } catch (Exception ex) { self.completionSource.TrySetException(ex); @@ -509,22 +451,6 @@ namespace Cysharp.Threading.Tasks.Linq { self.secondAwaiter = self.secondEnumerator.MoveNextAsync().GetAwaiter(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completionSource.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.completionSource.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.completionSource.TrySetException(ex); - return; - } catch (Exception ex) { self.completionSource.TrySetException(ex); @@ -567,19 +493,6 @@ namespace Cysharp.Threading.Tasks.Linq self.resultAwaiter.SourceOnCompleted(resultAwaitCoreDelegate, self); } } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.completionSource.TrySetException(ex); - } - catch (InvalidOperationException ex) - { - self.completionSource.TrySetException(ex); - } - catch (ArgumentNullException ex) - { - self.completionSource.TrySetException(ex); - } catch (Exception ex) { self.completionSource.TrySetException(ex); diff --git a/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs b/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs index 73f87e9..b17375e 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs @@ -299,11 +299,7 @@ namespace Cysharp.Threading.Tasks { applicationDataPath = Application.dataPath; } - catch (Exception ex) - { - // 记录初始化Application.dataPath时发生的异常,使用空字符串作为默认值 - UnityEngine.Debug.LogWarning($"PlayerLoopHelper: 无法获取Application.dataPath,使用空字符串作为默认值。错误: {ex.Message}\n堆栈: {ex.StackTrace}"); - } + catch { } #if UNITY_EDITOR && UNITY_2019_3_OR_NEWER // When domain reload is disabled, re-initialization is required when entering play mode; diff --git a/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs b/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs index 8fff543..f8a877a 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopTimer.cs @@ -101,25 +101,7 @@ namespace Cysharp.Threading.Tasks public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (!isDisposed) - { - if (disposing) - { - // 释放托管资源 - // 停止定时器运行 - tryStop = true; - isRunning = false; - } - - // 释放非托管资源(如果有) - isDisposed = true; - } + isDisposed = true; } bool IPlayerLoopItem.MoveNext() diff --git a/3d/Assets/Plugins/UniTask/Runtime/TaskPool.cs b/3d/Assets/Plugins/UniTask/Runtime/TaskPool.cs index e257093..e103559 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/TaskPool.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/TaskPool.cs @@ -30,11 +30,7 @@ namespace Cysharp.Threading.Tasks } } } - catch (Exception ex) - { - // 记录读取环境变量失败的情况,使用默认值MaxPoolSize = int.MaxValue - UnityEngine.Debug.LogWarning($"TaskPool: 无法读取环境变量 UNITASK_MAX_POOLSIZE,使用默认值 int.MaxValue。错误: {ex.Message}"); - } + catch { } MaxPoolSize = int.MaxValue; } diff --git a/3d/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs b/3d/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs index ee7d199..0b817fe 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs @@ -25,12 +25,9 @@ namespace Cysharp.Threading.Tasks void LogError(Exception ex) { #if UNITY_2018_3_OR_NEWER - // Unity平台的 LogException 方法直接传递异常对象,是安全的 UnityEngine.Debug.LogException(ex); #else - // 使用安全清理方法处理异常消息,防止日志注入攻击 - string safeMessage = UniTaskScheduler.SanitizeExceptionMessage(ex.ToString()); - Console.WriteLine("TriggerEvent Error: " + safeMessage); + Console.WriteLine(ex); #endif } @@ -50,22 +47,6 @@ namespace Cysharp.Threading.Tasks { h.OnNext(value); } - catch (OperationCanceledException ex) - { - // 操作被取消,记录错误 - LogError(ex); - Remove(h); - } - catch (InvalidOperationException ex) - { - LogError(ex); - Remove(h); - } - catch (NullReferenceException ex) - { - LogError(ex); - Remove(h); - } catch (Exception ex) { LogError(ex); @@ -100,19 +81,6 @@ namespace Cysharp.Threading.Tasks { h.OnCanceled(cancellationToken); } - catch (OperationCanceledException ex) - { - // 操作被取消,记录错误 - LogError(ex); - } - catch (InvalidOperationException ex) - { - LogError(ex); - } - catch (NullReferenceException ex) - { - LogError(ex); - } catch (Exception ex) { LogError(ex); @@ -147,19 +115,6 @@ namespace Cysharp.Threading.Tasks { h.OnCompleted(); } - catch (OperationCanceledException ex) - { - // 操作被取消,记录错误 - LogError(ex); - } - catch (InvalidOperationException ex) - { - LogError(ex); - } - catch (NullReferenceException ex) - { - LogError(ex); - } catch (Exception ex) { LogError(ex); @@ -194,19 +149,6 @@ namespace Cysharp.Threading.Tasks { h.OnError(exception); } - catch (OperationCanceledException ex) - { - // 操作被取消,记录错误 - LogError(ex); - } - catch (InvalidOperationException ex) - { - LogError(ex); - } - catch (NullReferenceException ex) - { - LogError(ex); - } catch (Exception ex) { LogError(ex); diff --git a/3d/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs b/3d/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs index a77b9d4..8ac8a29 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTask.Delay.cs @@ -1088,7 +1088,7 @@ namespace Cysharp.Threading.Tasks public bool IsCompleted => false; - public void GetResult() {Debug.Log("GetResult"); } + public void GetResult() { } public void OnCompleted(Action continuation) { diff --git a/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs b/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs index b3b29f3..9ef07d6 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs @@ -74,22 +74,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -108,22 +92,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -247,22 +215,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -281,22 +233,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -315,22 +251,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -472,22 +392,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -506,22 +410,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -540,22 +428,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -574,22 +446,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -749,22 +605,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -783,22 +623,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -817,22 +641,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -851,22 +659,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -885,22 +677,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1078,22 +854,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1112,22 +872,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1146,22 +890,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1180,22 +908,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1214,22 +926,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1248,22 +944,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1459,22 +1139,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1493,22 +1157,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1527,22 +1175,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1561,22 +1193,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1595,22 +1211,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1629,22 +1229,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1663,22 +1247,6 @@ namespace Cysharp.Threading.Tasks { self.t7 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1892,22 +1460,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1926,22 +1478,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1960,22 +1496,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1994,22 +1514,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2028,22 +1532,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2062,22 +1550,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2096,22 +1568,6 @@ namespace Cysharp.Threading.Tasks { self.t7 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2130,22 +1586,6 @@ namespace Cysharp.Threading.Tasks { self.t8 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2377,22 +1817,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2411,22 +1835,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2445,22 +1853,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2479,22 +1871,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2513,22 +1889,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2547,22 +1907,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2581,22 +1925,6 @@ namespace Cysharp.Threading.Tasks { self.t7 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2615,22 +1943,6 @@ namespace Cysharp.Threading.Tasks { self.t8 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2649,22 +1961,6 @@ namespace Cysharp.Threading.Tasks { self.t9 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2914,22 +2210,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2948,22 +2228,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2982,22 +2246,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3016,22 +2264,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3050,22 +2282,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3084,22 +2300,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3118,22 +2318,6 @@ namespace Cysharp.Threading.Tasks { self.t7 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3152,22 +2336,6 @@ namespace Cysharp.Threading.Tasks { self.t8 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3186,22 +2354,6 @@ namespace Cysharp.Threading.Tasks { self.t9 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3220,22 +2372,6 @@ namespace Cysharp.Threading.Tasks { self.t10 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3503,22 +2639,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3537,22 +2657,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3571,22 +2675,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3605,22 +2693,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3639,22 +2711,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3673,22 +2729,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3707,22 +2747,6 @@ namespace Cysharp.Threading.Tasks { self.t7 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3741,22 +2765,6 @@ namespace Cysharp.Threading.Tasks { self.t8 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3775,22 +2783,6 @@ namespace Cysharp.Threading.Tasks { self.t9 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3809,22 +2801,6 @@ namespace Cysharp.Threading.Tasks { self.t10 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3843,22 +2819,6 @@ namespace Cysharp.Threading.Tasks { self.t11 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4144,22 +3104,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4178,22 +3122,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4212,22 +3140,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4246,22 +3158,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4280,22 +3176,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4314,22 +3194,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4348,22 +3212,6 @@ namespace Cysharp.Threading.Tasks { self.t7 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4382,22 +3230,6 @@ namespace Cysharp.Threading.Tasks { self.t8 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4416,22 +3248,6 @@ namespace Cysharp.Threading.Tasks { self.t9 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4450,22 +3266,6 @@ namespace Cysharp.Threading.Tasks { self.t10 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4484,22 +3284,6 @@ namespace Cysharp.Threading.Tasks { self.t11 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4518,22 +3302,6 @@ namespace Cysharp.Threading.Tasks { self.t12 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4837,22 +3605,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4871,22 +3623,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4905,22 +3641,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4939,22 +3659,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4973,22 +3677,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5007,22 +3695,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5041,22 +3713,6 @@ namespace Cysharp.Threading.Tasks { self.t7 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5075,22 +3731,6 @@ namespace Cysharp.Threading.Tasks { self.t8 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5109,22 +3749,6 @@ namespace Cysharp.Threading.Tasks { self.t9 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5143,22 +3767,6 @@ namespace Cysharp.Threading.Tasks { self.t10 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5177,22 +3785,6 @@ namespace Cysharp.Threading.Tasks { self.t11 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5211,22 +3803,6 @@ namespace Cysharp.Threading.Tasks { self.t12 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5245,22 +3821,6 @@ namespace Cysharp.Threading.Tasks { self.t13 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5582,22 +4142,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5616,22 +4160,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5650,22 +4178,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5684,22 +4196,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5718,22 +4214,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5752,22 +4232,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5786,22 +4250,6 @@ namespace Cysharp.Threading.Tasks { self.t7 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5820,22 +4268,6 @@ namespace Cysharp.Threading.Tasks { self.t8 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5854,22 +4286,6 @@ namespace Cysharp.Threading.Tasks { self.t9 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5888,22 +4304,6 @@ namespace Cysharp.Threading.Tasks { self.t10 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5922,22 +4322,6 @@ namespace Cysharp.Threading.Tasks { self.t11 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5956,22 +4340,6 @@ namespace Cysharp.Threading.Tasks { self.t12 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5990,22 +4358,6 @@ namespace Cysharp.Threading.Tasks { self.t13 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6024,22 +4376,6 @@ namespace Cysharp.Threading.Tasks { self.t14 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6379,22 +4715,6 @@ namespace Cysharp.Threading.Tasks { self.t1 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6413,22 +4733,6 @@ namespace Cysharp.Threading.Tasks { self.t2 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6447,22 +4751,6 @@ namespace Cysharp.Threading.Tasks { self.t3 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6481,22 +4769,6 @@ namespace Cysharp.Threading.Tasks { self.t4 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6515,22 +4787,6 @@ namespace Cysharp.Threading.Tasks { self.t5 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6549,22 +4805,6 @@ namespace Cysharp.Threading.Tasks { self.t6 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6583,22 +4823,6 @@ namespace Cysharp.Threading.Tasks { self.t7 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6617,22 +4841,6 @@ namespace Cysharp.Threading.Tasks { self.t8 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6651,22 +4859,6 @@ namespace Cysharp.Threading.Tasks { self.t9 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6685,22 +4877,6 @@ namespace Cysharp.Threading.Tasks { self.t10 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6719,22 +4895,6 @@ namespace Cysharp.Threading.Tasks { self.t11 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6753,22 +4913,6 @@ namespace Cysharp.Threading.Tasks { self.t12 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6787,22 +4931,6 @@ namespace Cysharp.Threading.Tasks { self.t13 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6821,22 +4949,6 @@ namespace Cysharp.Threading.Tasks { self.t14 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6855,22 +4967,6 @@ namespace Cysharp.Threading.Tasks { self.t15 = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); diff --git a/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs b/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs index 6a33485..09b98e6 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs @@ -69,22 +69,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -104,22 +88,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -239,22 +207,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -274,22 +226,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -309,22 +245,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -462,22 +382,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -497,22 +401,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -532,22 +420,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -567,22 +439,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -738,22 +594,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -773,22 +613,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -808,22 +632,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -843,22 +651,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -878,22 +670,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1067,22 +843,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1102,22 +862,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1137,22 +881,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1172,22 +900,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1207,22 +919,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1242,22 +938,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1449,22 +1129,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1484,22 +1148,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1519,22 +1167,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1554,22 +1186,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1589,22 +1205,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1624,22 +1224,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1659,22 +1243,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1884,22 +1452,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1919,22 +1471,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1954,22 +1490,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -1989,22 +1509,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2024,22 +1528,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2059,22 +1547,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2094,22 +1566,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2129,22 +1585,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2372,22 +1812,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2407,22 +1831,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2442,22 +1850,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2477,22 +1869,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2512,22 +1888,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2547,22 +1907,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2582,22 +1926,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2617,22 +1945,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2652,22 +1964,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2913,22 +2209,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2948,22 +2228,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -2983,22 +2247,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3018,22 +2266,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3053,22 +2285,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3088,22 +2304,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3123,22 +2323,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3158,22 +2342,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3193,22 +2361,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3228,22 +2380,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3507,22 +2643,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3542,22 +2662,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3577,22 +2681,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3612,22 +2700,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3647,22 +2719,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3682,22 +2738,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3717,22 +2757,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3752,22 +2776,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3787,22 +2795,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3822,22 +2814,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -3857,22 +2833,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4154,22 +3114,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4189,22 +3133,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4224,22 +3152,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4259,22 +3171,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4294,22 +3190,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4329,22 +3209,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4364,22 +3228,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4399,22 +3247,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4434,22 +3266,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4469,22 +3285,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4504,22 +3304,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4539,22 +3323,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4854,22 +3622,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4889,22 +3641,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4924,22 +3660,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4959,22 +3679,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -4994,22 +3698,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5029,22 +3717,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5064,22 +3736,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5099,22 +3755,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5134,22 +3774,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5169,22 +3793,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5204,22 +3812,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5239,22 +3831,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5274,22 +3850,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5607,22 +4167,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5642,22 +4186,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5677,22 +4205,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5712,22 +4224,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5747,22 +4243,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5782,22 +4262,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5817,22 +4281,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5852,22 +4300,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5887,22 +4319,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5922,22 +4338,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5957,22 +4357,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -5992,22 +4376,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6027,22 +4395,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6062,22 +4414,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6413,22 +4749,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6448,22 +4768,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6483,22 +4787,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6518,22 +4806,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6553,22 +4825,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6588,22 +4844,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6623,22 +4863,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6658,22 +4882,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6693,22 +4901,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6728,22 +4920,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6763,22 +4939,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6798,22 +4958,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6833,22 +4977,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6868,22 +4996,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); @@ -6903,22 +5015,6 @@ namespace Cysharp.Threading.Tasks { result = awaiter.GetResult(); } - catch (OperationCanceledException ex) - { - // 操作被取消,设置为取消状态 - self.core.TrySetException(ex); - return; - } - catch (ObjectDisposedException ex) - { - self.core.TrySetException(ex); - return; - } - catch (InvalidOperationException ex) - { - self.core.TrySetException(ex); - return; - } catch (Exception ex) { self.core.TrySetException(ex); diff --git a/3d/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs b/3d/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs index d561d3e..bf2d054 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs @@ -113,10 +113,8 @@ namespace Cysharp.Threading.Tasks UniTaskScheduler.PublishUnobservedTaskException(e.GetException().SourceException); } } - catch (Exception reportEx) + catch { - // 记录报告未处理异常时发生的错误,避免异常被静默忽略 - UnityEngine.Debug.LogError($"UniTaskCompletionSource: 报告未处理的异常时发生错误 - {reportEx.Message}\n堆栈: {reportEx.StackTrace}"); } } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs b/3d/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs index 1774139..d2bd961 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTaskObservableExtensions.cs @@ -1,7 +1,6 @@ #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member using System; -using System.Diagnostics; using System.Runtime.ExceptionServices; using System.Threading; using Cysharp.Threading.Tasks.Internal; @@ -296,18 +295,11 @@ namespace Cysharp.Threading.Tasks.Internal EmptyDisposable() { - UnityEngine.Debug.Log("EmptyDisposable.Instance created."); + } public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - // 空实现,无需释放资源 } } @@ -546,33 +538,24 @@ namespace Cysharp.Threading.Tasks.Internal public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) + lock (gate) { - lock (gate) + if (parent != null) { - if (parent != null) + lock (parent.observerLock) { - lock (parent.observerLock) + var listObserver = parent.outObserver as ListObserver; + if (listObserver != null) { - var listObserver = parent.outObserver as ListObserver; - if (listObserver != null) - { - parent.outObserver = listObserver.Remove(unsubscribeTarget); - } - else - { - parent.outObserver = EmptyObserver.Instance; - } - - unsubscribeTarget = null; - parent = null; + parent.outObserver = listObserver.Remove(unsubscribeTarget); } + else + { + parent.outObserver = EmptyObserver.Instance; + } + + unsubscribeTarget = null; + parent = null; } } } @@ -648,15 +631,15 @@ namespace Cysharp.Threading.Tasks.Internal } public void OnCompleted() - {UnityEngine.Debug.Log("EmptyObserver.OnCompleted"); + { } public void OnError(Exception error) - {UnityEngine.Debug.Log("EmptyObserver.OnError"); + { } public void OnNext(T value) - {UnityEngine.Debug.Log("EmptyObserver.OnNext"); + { } } @@ -670,7 +653,7 @@ namespace Cysharp.Threading.Tasks.Internal } public void OnCompleted() - {UnityEngine.Debug.Log("ThrowObserver.OnCompleted"); + { } public void OnError(Exception error) @@ -679,7 +662,7 @@ namespace Cysharp.Threading.Tasks.Internal } public void OnNext(T value) - {UnityEngine.Debug.Log("ThrowObserver.OnNext"); + { } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs b/3d/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs index 3ac1a89..2f91f2a 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTaskScheduler.cs @@ -1,7 +1,6 @@ #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member using System; -using System.Text; using System.Threading; namespace Cysharp.Threading.Tasks @@ -11,65 +10,6 @@ namespace Cysharp.Threading.Tasks public static class UniTaskScheduler { - /// - /// 安全清理异常消息字符串,防止日志注入攻击 - /// 清理控制字符、限制长度、转义特殊字符 - /// - /// 原始异常消息 - /// 最大长度限制,默认1000字符 - /// 清理后的安全消息字符串 - internal static string SanitizeExceptionMessage(string message, int maxLength = 1000) - { - if (string.IsNullOrEmpty(message)) - { - return string.Empty; - } - - // 创建StringBuilder用于构建清理后的消息 - var sanitized = new StringBuilder(message.Length); - - // 遍历每个字符进行清理 - for (int i = 0; i < message.Length && sanitized.Length < maxLength; i++) - { - char c = message[i]; - - // 保留可打印字符(ASCII 32-126)和常见的Unicode字符 - // 移除控制字符(ASCII 0-31,除了换行符和制表符) - if (char.IsControl(c) && c != '\n' && c != '\r' && c != '\t') - { - // 将控制字符替换为安全的转义表示 - sanitized.Append($"\\u{(int)c:X4}"); - } - else if (c == '\n') - { - // 将换行符替换为安全表示,防止日志注入 - sanitized.Append("\\n"); - } - else if (c == '\r') - { - // 将回车符替换为安全表示 - sanitized.Append("\\r"); - } - else if (c == '\t') - { - // 将制表符替换为空格 - sanitized.Append(" "); - } - else - { - // 保留正常的可打印字符 - sanitized.Append(c); - } - } - - // 如果消息被截断,添加截断标记 - if (message.Length > maxLength) - { - sanitized.Append("...[消息已截断]"); - } - - return sanitized.ToString(); - } public static event Action UnobservedTaskException; /// @@ -102,7 +42,7 @@ namespace Cysharp.Threading.Tasks { if (ex != null) { - if (ex is OperationCanceledException) + if (!PropagateOperationCanceledException && ex is OperationCanceledException) { return; } @@ -130,9 +70,7 @@ namespace Cysharp.Threading.Tasks string msg = null; if (UnobservedExceptionWriteLogType != UnityEngine.LogType.Exception) { - // 使用安全清理方法处理异常消息,防止日志注入攻击 - string safeExceptionMessage = SanitizeExceptionMessage(ex.ToString()); - msg = "UnobservedTaskException: " + safeExceptionMessage; + msg = "UnobservedTaskException: " + ex.ToString(); } switch (UnobservedExceptionWriteLogType) { @@ -155,9 +93,7 @@ namespace Cysharp.Threading.Tasks break; } #else - // 使用安全清理方法处理异常消息,防止日志注入攻击 - string safeMessage = SanitizeExceptionMessage(ex.ToString()); - Console.WriteLine("UnobservedTaskException: " + safeMessage); + Console.WriteLine("UnobservedTaskException: " + ex.ToString()); #endif } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs b/3d/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs index dd5a824..450e019 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTaskSynchronizationContext.cs @@ -65,7 +65,7 @@ namespace Cysharp.Threading.Tasks } finally { - + if (lockTaken) gate.Exit(false); } } @@ -97,7 +97,7 @@ namespace Cysharp.Threading.Tasks } finally { - gate.Exit(false); + if (lockTaken) gate.Exit(false); } } @@ -125,7 +125,7 @@ namespace Cysharp.Threading.Tasks } finally { - gate.Exit(false); + if (lockTaken) gate.Exit(false); } } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs b/3d/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs index 5ab8c7b..c7e9ed9 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTaskVoid.cs @@ -13,7 +13,6 @@ namespace Cysharp.Threading.Tasks { public void Forget() { - UnityEngine.Debug.Log("UniTaskVoid.Forget called."); } } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs b/3d/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs index b7b49ff..5a5ea1c 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.cs @@ -259,8 +259,6 @@ namespace Cysharp.Threading.Tasks public static UniTask ToUniTask(this ResourceRequest asyncOperation, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken), bool cancelImmediately = false) { Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); - // 注意:CancellationToken 是结构体,不能为null。default(CancellationToken) 是有效值,其 IsCancellationRequested 为 false - // 此处的访问是安全的,静态分析工具可能因为可选参数而误报 if (cancellationToken.IsCancellationRequested) return UniTask.FromCanceled(cancellationToken); if (asyncOperation.isDone) return UniTask.FromResult(asyncOperation.asset); return new UniTask(ResourceRequestConfiguredSource.Create(asyncOperation, timing, progress, cancellationToken, cancelImmediately, out var token), token); @@ -352,12 +350,12 @@ namespace Cysharp.Threading.Tasks result.asyncOperation = asyncOperation; result.progress = progress; result.cancellationToken = cancellationToken; - result.cancelImmediately = false; + result.cancelImmediately = cancelImmediately; result.completed = false; asyncOperation.completed += result.continuationAction; - if (cancellationToken.CanBeCanceled) + if (cancelImmediately && cancellationToken.CanBeCanceled) { result.cancellationTokenRegistration = cancellationToken.RegisterWithoutCaptureExecutionContext(state => { diff --git a/3d/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs b/3d/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs index ceb85b3..7f1a90c 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UnityAsyncExtensions.uGUI.cs @@ -344,16 +344,7 @@ namespace Cysharp.Threading.Tasks public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - innerEvent.RemoveListener(invokeDelegate); - } + innerEvent.RemoveListener(invokeDelegate); } } @@ -417,13 +408,7 @@ namespace Cysharp.Threading.Tasks public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (!isDisposed && disposing) + if (!isDisposed) { isDisposed = true; TaskTracker.RemoveTracking(this); @@ -533,13 +518,7 @@ namespace Cysharp.Threading.Tasks public void Dispose() { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (!isDisposed && disposing) + if (!isDisposed) { isDisposed = true; TaskTracker.RemoveTracking(this);