diff --git a/3d/Assets/3rdParty/ZCalendar/Scripts/ZCalendar.cs b/3d/Assets/3rdParty/ZCalendar/Scripts/ZCalendar.cs index 1c94cb7..d430d66 100644 --- a/3d/Assets/3rdParty/ZCalendar/Scripts/ZCalendar.cs +++ b/3d/Assets/3rdParty/ZCalendar/Scripts/ZCalendar.cs @@ -8,23 +8,23 @@ namespace ZTools public class ZCalendar : MonoBehaviour { /// - /// 数据更新时,可获取到每一个日期,并对其进行操作 + /// 锟斤拷锟捷革拷锟斤拷时锟斤拷锟缴伙拷取锟斤拷每一锟斤拷锟斤拷锟节o拷锟斤拷锟斤拷锟斤拷锟斤拷胁锟斤拷锟 /// public event Action UpdateDateEvent; /// - /// 可以获取到点击的某一天 + /// 锟斤拷锟皆伙拷取锟斤拷锟斤拷锟斤拷锟侥骋伙拷锟 /// public event Action ChoiceDayEvent; /// - /// 选择区间时间事件 + /// 选锟斤拷锟斤拷锟斤拷时锟斤拷锟铰硷拷 /// public event Action RangeTimeEvent; /// - /// 日历加载结束 + /// 锟斤拷锟斤拷锟斤拷锟截斤拷锟斤拷 /// public event Action CompleteEvent; /// - /// 获取当前选中的天对象 + /// 锟斤拷取锟斤拷前选锟叫碉拷锟斤拷锟斤拷锟 /// public ZCalendarDayItem CrtTime { get; set; } /// @@ -36,7 +36,7 @@ namespace ZTools /// private ZCalendarController zCalendarController; /// - /// 入口 + /// 锟斤拷锟 /// private void Start() { @@ -48,28 +48,28 @@ namespace ZTools pos = this.transform.localPosition }; zCalendarController.Init(); - // 开启时自动初始化 + // 锟斤拷锟斤拷时锟皆讹拷锟斤拷始锟斤拷 if (zCalendarModel.awake2Init) { Init(); } } /// - /// 按照现在时间初始化 + /// 锟斤拷锟斤拷锟斤拷锟斤拷时锟斤拷锟绞硷拷锟 /// public void Init() { zCalendarController.InitDate(DateTime.Now); } /// - /// 按照DateTime格式初始化日历 + /// 锟斤拷锟斤拷DateTime锟斤拷式锟斤拷始锟斤拷锟斤拷锟斤拷 /// public void Init(DateTime dateTime) { zCalendarController.InitDate(dateTime); } /// - /// 按照YYYY-MM-DD格式初始化日历 + /// 锟斤拷锟斤拷YYYY-MM-DD锟斤拷式锟斤拷始锟斤拷锟斤拷锟斤拷 /// public void Init(string dateTime) { @@ -77,14 +77,14 @@ namespace ZTools zCalendarController.InitDate(new DateTime(int.Parse(dateTimes[0]), int.Parse(dateTimes[1]), int.Parse(dateTimes[2]))); } /// - /// 显示弹窗 + /// 锟斤拷示锟斤拷锟斤拷 /// public void Show() { zCalendarController.Show(); } /// - /// 隐藏弹窗 + /// 锟斤拷锟截碉拷锟斤拷 /// public void Hide() { @@ -92,10 +92,10 @@ namespace ZTools } /// - /// 切换时间 + /// 锟叫伙拷时锟斤拷 /// /// - [Obsolete("事件触发器,请使用UpdateDateEvent获取切换月份时加载的时间对象")] + [Obsolete("锟铰硷拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷使锟斤拷UpdateDateEvent锟斤拷取锟叫伙拷锟铰凤拷时锟斤拷锟截碉拷时锟斤拷锟斤拷锟")] public void UpdateDate(ZCalendarDayItem obj) { if (null != UpdateDateEvent) @@ -104,9 +104,9 @@ namespace ZTools } } /// - /// 日期点击 + /// 锟斤拷锟节碉拷锟 /// - [Obsolete("事件触发器,请使用ChoiceDayEvent获取当前选择的时间")] + [Obsolete("锟铰硷拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷使锟斤拷ChoiceDayEvent锟斤拷取锟斤拷前选锟斤拷锟绞憋拷锟")] public void DayClick(ZCalendarDayItem dayItem) { if (null != ChoiceDayEvent) @@ -116,9 +116,9 @@ namespace ZTools CrtTime = dayItem; } /// - /// 加载结束 + /// 锟斤拷锟截斤拷锟斤拷 /// - [Obsolete("事件触发器,请使用CompleteEvent获取日历加载完成事件")] + [Obsolete("锟铰硷拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷使锟斤拷CompleteEvent锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷录锟")] public void DateComplete() { if (null != CompleteEvent) @@ -127,11 +127,11 @@ namespace ZTools } } /// - /// 区间日期选择 + /// 锟斤拷锟斤拷锟斤拷锟斤拷选锟斤拷 /// /// /// - [Obsolete("事件触发器,请使用RangeTimeEvent获取区间时间")] + [Obsolete("锟铰硷拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷使锟斤拷RangeTimeEvent锟斤拷取锟斤拷锟斤拷时锟斤拷")] public void RangeCalendar(ZCalendarDayItem firstDay, ZCalendarDayItem secondDay ) { if (null != RangeTimeEvent) @@ -139,10 +139,26 @@ namespace ZTools RangeTimeEvent.Invoke(firstDay, secondDay); } } + /// + /// 缁勪欢閿姣佹椂娓呯悊璧勬簮 + /// private void OnDestroy() { + // 娓呯悊浜嬩欢璁㈤槄锛岄伩鍏嶅唴瀛樻硠婕 + UpdateDateEvent = null; + ChoiceDayEvent = null; + RangeTimeEvent = null; + CompleteEvent = null; + + // 娓呯悊寮曠敤 zCalendarController = null; - GC.Collect(); + zCalendarModel = null; + CrtTime = null; + + // 绉婚櫎 GC.Collect() 璋冪敤 + // .NET 鐨勫瀮鍦惧洖鏀跺櫒浼氳嚜鍔ㄧ鐞嗗唴瀛橈紝涓嶉渶瑕佹墜鍔ㄨ皟鐢 GC.Collect() + // 棰戠箒璋冪敤 GC.Collect() 浼氬鑷村瀮鍦惧洖鏀舵晥鐜囦笅闄嶏紝褰卞搷搴旂敤绋嬪簭鎬ц兘 + // 濡傛灉鏈夐潪鎵樼璧勬簮闇瑕侀噴鏀撅紝搴旇瀹炵幇 IDisposable 鎺ュ彛锛屼娇鐢 using 璇彞纭繚璧勬簮閲婃斁 } } } diff --git a/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Source.cs b/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Source.cs index 7a99220..8856cd0 100644 --- a/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Source.cs +++ b/3d/Assets/AVProVideo/Editor/Scripts/Components/MediaPlayerEditor_Source.cs @@ -384,8 +384,10 @@ namespace RenderHeads.Media.AVProVideo.Editor EditorHelper.IMGUI.NoticeBox(MessageType.Warning, "Using this very large file inside StreamingAssets folder on Android isn't recommended. Deployments will be slow and mapping the file from the StreamingAssets JAR may cause storage and memory issues. We recommend loading from another folder on the device."); } } - catch (System.Exception) + catch (System.Exception ex) { + // 璁板綍妫鏌ndroid鏂囦欢澶у皬鏃跺彂鐢熺殑寮傚父锛屼究浜庤皟璇曞拰缁存姢 + UnityEngine.Debug.LogWarning($"MediaPlayerEditor_Source: 妫鏌ndroid鏂囦欢澶у皬鏃跺彂鐢熼敊璇 - {ex.Message}\n鏂囦欢璺緞: {fullPath}\n鍫嗘爤: {ex.StackTrace}"); } } } diff --git a/3d/Assets/Framework/Editor/ProcessScoreWindow.cs b/3d/Assets/Framework/Editor/ProcessScoreWindow.cs index 201dcae..e695464 100644 --- a/3d/Assets/Framework/Editor/ProcessScoreWindow.cs +++ b/3d/Assets/Framework/Editor/ProcessScoreWindow.cs @@ -68,8 +68,19 @@ public class ProcessScoreWindow : EditorWindow fontStyle = FontStyle.Bold }; } + catch (ArgumentException e) + { + // 璁板綍鍒濆鍖栨牱寮忔椂鐨勫紓甯革紝渚夸簬璋冭瘯鍜岀淮鎶 + Debug.LogError($"ProcessScoreWindow鍒濆鍖栨牱寮忓け璐ワ紙鍙傛暟閿欒锛: {e.Message}\n{e.StackTrace}"); + } + catch (NullReferenceException e) + { + Debug.LogError($"ProcessScoreWindow鍒濆鍖栨牱寮忓け璐ワ紙绌哄紩鐢級: {e.Message}\n{e.StackTrace}"); + } catch (Exception e) { + // 璁板綍鍒濆鍖栨牱寮忔椂鐨勫紓甯革紝渚夸簬璋冭瘯鍜岀淮鎶 + Debug.LogError($"ProcessScoreWindow鍒濆鍖栨牱寮忓け璐: {e.Message}\n{e.StackTrace}"); } } @@ -271,6 +282,14 @@ public class ProcessScoreWindow : EditorWindow { EditorGUILayout.HelpBox($"褰撳墠妯″紡 '{processManager._currentMode}' 涓嶅瓨鍦", MessageType.Error); } + catch (NullReferenceException ex) + { + EditorGUILayout.HelpBox($"鍙戠敓閿欒锛堢┖寮曠敤锛: {ex.Message}", MessageType.Error); + } + catch (InvalidOperationException ex) + { + EditorGUILayout.HelpBox($"鍙戠敓閿欒锛堟棤鏁堟搷浣滐級: {ex.Message}", MessageType.Error); + } catch (System.Exception ex) { EditorGUILayout.HelpBox($"鍙戠敓閿欒: {ex.Message}", MessageType.Error); @@ -316,6 +335,18 @@ public class ProcessScoreWindow : EditorWindow Repaint(); // 鍒锋柊鐣岄潰 } + catch (OperationCanceledException ex) + { + EditorUtility.DisplayDialog("璺宠浆鍙栨秷", $"璺宠浆鎿嶄綔琚彇娑: {ex.Message}", "纭畾"); + } + catch (InvalidOperationException ex) + { + EditorUtility.DisplayDialog("璺宠浆澶辫触", $"璺宠浆杩囩▼涓彂鐢熼敊璇紙鏃犳晥鎿嶄綔锛: {ex.Message}", "纭畾"); + } + catch (ArgumentException ex) + { + EditorUtility.DisplayDialog("璺宠浆澶辫触", $"璺宠浆杩囩▼涓彂鐢熼敊璇紙鍙傛暟閿欒锛: {ex.Message}", "纭畾"); + } catch (System.Exception ex) { EditorUtility.DisplayDialog("璺宠浆澶辫触", $"璺宠浆杩囩▼涓彂鐢熼敊璇: {ex.Message}", "纭畾"); diff --git a/3d/Assets/Framework/Scripts/Runtime/Engine/Engine.Utility/HashUtility.cs b/3d/Assets/Framework/Scripts/Runtime/Engine/Engine.Utility/HashUtility.cs index c9ea867..68b03a7 100644 --- a/3d/Assets/Framework/Scripts/Runtime/Engine/Engine.Utility/HashUtility.cs +++ b/3d/Assets/Framework/Scripts/Runtime/Engine/Engine.Utility/HashUtility.cs @@ -15,29 +15,107 @@ namespace MotionFramework.Utility return result.ToLower(); } - #region SHA1 + #region SHA1 [宸插簾寮 - 浣跨敤SHA256鏇夸唬] /// - /// 鑾峰彇瀛楃涓茬殑Hash鍊 + /// 鑾峰彇瀛楃涓茬殑Hash鍊硷紙宸插簾寮冿紝璇蜂娇鐢⊿tringSHA256锛 /// + /// + /// SHA1绠楁硶宸茶璁や负涓嶅畨鍏紝宸叉浛鎹负SHA256瀹炵幇銆備繚鐣欐鏂规硶浠呬负鍚戝悗鍏煎銆 + /// + [System.Obsolete("SHA1绠楁硶涓嶅畨鍏紝璇蜂娇鐢⊿tringSHA256鏂规硶", false)] public static string StringSHA1(string str) { - byte[] buffer = Encoding.UTF8.GetBytes(str); - return BytesSHA1(buffer); + // 宸叉浛鎹负SHA256瀹炵幇浠ユ彁楂樺畨鍏ㄦ + return StringSHA256(str); } /// - /// 鑾峰彇鏂囦欢鐨凥ash鍊 + /// 鑾峰彇鏂囦欢鐨凥ash鍊硷紙宸插簾寮冿紝璇蜂娇鐢‵ileSHA256锛 /// + /// + /// SHA1绠楁硶宸茶璁や负涓嶅畨鍏紝宸叉浛鎹负SHA256瀹炵幇銆備繚鐣欐鏂规硶浠呬负鍚戝悗鍏煎銆 + /// + [System.Obsolete("SHA1绠楁硶涓嶅畨鍏紝璇蜂娇鐢‵ileSHA256鏂规硶", false)] public static string FileSHA1(string filePath) + { + // 宸叉浛鎹负SHA256瀹炵幇浠ユ彁楂樺畨鍏ㄦ + return FileSHA256(filePath); + } + + /// + /// 鑾峰彇鏁版嵁娴佺殑Hash鍊硷紙宸插簾寮冿紝璇蜂娇鐢⊿treamSHA256锛 + /// + /// + /// SHA1绠楁硶宸茶璁や负涓嶅畨鍏紝宸叉浛鎹负SHA256瀹炵幇銆備繚鐣欐鏂规硶浠呬负鍚戝悗鍏煎銆 + /// + [System.Obsolete("SHA1绠楁硶涓嶅畨鍏紝璇蜂娇鐢⊿treamSHA256鏂规硶", false)] + public static string StreamSHA1(Stream stream) + { + // 宸叉浛鎹负SHA256瀹炵幇浠ユ彁楂樺畨鍏ㄦ + return StreamSHA256(stream); + } + + /// + /// 鑾峰彇瀛楄妭鏁扮粍鐨凥ash鍊硷紙宸插簾寮冿紝璇蜂娇鐢˙ytesSHA256锛 + /// + /// + /// SHA1绠楁硶宸茶璁や负涓嶅畨鍏紝宸叉浛鎹负SHA256瀹炵幇銆備繚鐣欐鏂规硶浠呬负鍚戝悗鍏煎銆 + /// + [System.Obsolete("SHA1绠楁硶涓嶅畨鍏紝璇蜂娇鐢˙ytesSHA256鏂规硶", false)] + public static string BytesSHA1(byte[] buffer) + { + // 宸叉浛鎹负SHA256瀹炵幇浠ユ彁楂樺畨鍏ㄦ + return BytesSHA256(buffer); + } + #endregion + + #region SHA256 [鎺ㄨ崘浣跨敤] + /// + /// 鑾峰彇瀛楃涓茬殑SHA256鍝堝笇鍊硷紙鎺ㄨ崘浣跨敤锛 + /// + /// 瑕佽绠楀搱甯岀殑瀛楃涓 + /// SHA256鍝堝笇鍊肩殑鍗佸叚杩涘埗瀛楃涓 + public static string StringSHA256(string str) + { + byte[] buffer = Encoding.UTF8.GetBytes(str); + return BytesSHA256(buffer); + } + + /// + /// 鑾峰彇鏂囦欢鐨凷HA256鍝堝笇鍊硷紙鎺ㄨ崘浣跨敤锛 + /// + /// 鏂囦欢璺緞 + /// SHA256鍝堝笇鍊肩殑鍗佸叚杩涘埗瀛楃涓诧紝濡傛灉鏂囦欢涓嶅瓨鍦ㄦ垨璇诲彇澶辫触鍒欒繑鍥炵┖瀛楃涓 + public static string FileSHA256(string filePath) { try { using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read)) { - return StreamSHA1(fs); + return StreamSHA256(fs); } } - catch (Exception e) + catch (FileNotFoundException e) + { + MotionLog.Exception($"鏂囦欢涓嶅瓨鍦: {filePath}\n{e}"); + return string.Empty; + } + catch (DirectoryNotFoundException e) + { + MotionLog.Exception($"鐩綍涓嶅瓨鍦: {filePath}\n{e}"); + return string.Empty; + } + catch (UnauthorizedAccessException e) + { + MotionLog.Exception($"璁块棶琚嫆缁濓紝鏉冮檺涓嶈冻: {filePath}\n{e}"); + return string.Empty; + } + catch (ArgumentException e) + { + MotionLog.Exception($"鍙傛暟閿欒: {filePath}\n{e}"); + return string.Empty; + } + catch (IOException e) { MotionLog.Exception(e.ToString()); return string.Empty; @@ -45,13 +123,18 @@ namespace MotionFramework.Utility } /// - /// 鑾峰彇鏁版嵁娴佺殑Hash鍊 + /// 鑾峰彇鏁版嵁娴佺殑SHA256鍝堝笇鍊硷紙鎺ㄨ崘浣跨敤锛 /// - public static string StreamSHA1(Stream stream) + /// 瑕佽绠楀搱甯岀殑鏁版嵁娴 + /// SHA256鍝堝笇鍊肩殑鍗佸叚杩涘埗瀛楃涓 + /// + /// 浣跨敤SHA256绠楁硶锛岀敓鎴256浣嶇殑鏁e垪鐮侊紝鎻愪緵鏇撮珮鐨勫畨鍏ㄦ + /// + public static string StreamSHA256(Stream stream) { - // 璇存槑锛氬垱寤虹殑鏄疭HA1绫荤殑瀹炰緥锛岀敓鎴愮殑鏄160浣嶇殑鏁e垪鐮 + // 浣跨敤SHA256绠楁硶鏇夸唬涓嶅畨鍏ㄧ殑SHA1锛屾彁渚涙洿楂樼殑瀹夊叏鎬 // 浣跨敤 using 璇彞纭繚璧勬簮姝g‘閲婃斁锛岄槻姝㈣祫婧愭硠婕 - using (HashAlgorithm hash = HashAlgorithm.Create()) + using (SHA256 hash = SHA256.Create()) { byte[] hashBytes = hash.ComputeHash(stream); return ToString(hashBytes); @@ -59,13 +142,18 @@ namespace MotionFramework.Utility } /// - /// 鑾峰彇瀛楄妭鏁扮粍鐨凥ash鍊 + /// 鑾峰彇瀛楄妭鏁扮粍鐨凷HA256鍝堝笇鍊硷紙鎺ㄨ崘浣跨敤锛 /// - public static string BytesSHA1(byte[] buffer) + /// 瑕佽绠楀搱甯岀殑瀛楄妭鏁扮粍 + /// SHA256鍝堝笇鍊肩殑鍗佸叚杩涘埗瀛楃涓 + /// + /// 浣跨敤SHA256绠楁硶锛岀敓鎴256浣嶇殑鏁e垪鐮侊紝鎻愪緵鏇撮珮鐨勫畨鍏ㄦ + /// + public static string BytesSHA256(byte[] buffer) { - // 璇存槑锛氬垱寤虹殑鏄疭HA1绫荤殑瀹炰緥锛岀敓鎴愮殑鏄160浣嶇殑鏁e垪鐮 + // 浣跨敤SHA256绠楁硶鏇夸唬涓嶅畨鍏ㄧ殑SHA1锛屾彁渚涙洿楂樼殑瀹夊叏鎬 // 浣跨敤 using 璇彞纭繚璧勬簮姝g‘閲婃斁锛岄槻姝㈣祫婧愭硠婕 - using (HashAlgorithm hash = HashAlgorithm.Create()) + using (SHA256 hash = SHA256.Create()) { byte[] hashBytes = hash.ComputeHash(buffer); return ToString(hashBytes); @@ -73,59 +161,57 @@ namespace MotionFramework.Utility } #endregion - #region MD5 + #region MD5 [宸插簾寮 - 浣跨敤SHA256鏇夸唬] /// - /// 鑾峰彇瀛楃涓茬殑MD5 + /// 鑾峰彇瀛楃涓茬殑MD5锛堝凡搴熷純锛岃浣跨敤StringSHA256锛 /// + /// + /// MD5绠楁硶宸茶璁や负涓嶅畨鍏紝宸叉浛鎹负SHA256瀹炵幇銆備繚鐣欐鏂规硶浠呬负鍚戝悗鍏煎銆 + /// + [System.Obsolete("MD5绠楁硶涓嶅畨鍏紝璇蜂娇鐢⊿tringSHA256鏂规硶", false)] public static string StringMD5(string str) { - byte[] buffer = Encoding.UTF8.GetBytes(str); - return BytesMD5(buffer); + // 宸叉浛鎹负SHA256瀹炵幇浠ユ彁楂樺畨鍏ㄦ + return StringSHA256(str); } /// - /// 鑾峰彇鏂囦欢鐨凪D5 + /// 鑾峰彇鏂囦欢鐨凪D5锛堝凡搴熷純锛岃浣跨敤FileSHA256锛 /// + /// + /// MD5绠楁硶宸茶璁や负涓嶅畨鍏紝宸叉浛鎹负SHA256瀹炵幇銆備繚鐣欐鏂规硶浠呬负鍚戝悗鍏煎銆 + /// + [System.Obsolete("MD5绠楁硶涓嶅畨鍏紝璇蜂娇鐢‵ileSHA256鏂规硶", false)] public static string FileMD5(string filePath) { - try - { - using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read)) - { - return StreamMD5(fs); - } - } - catch (Exception e) - { - MotionLog.Exception(e.ToString()); - return string.Empty; - } + // 宸叉浛鎹负SHA256瀹炵幇浠ユ彁楂樺畨鍏ㄦ + return FileSHA256(filePath); } /// - /// 鑾峰彇鏁版嵁娴佺殑MD5 + /// 鑾峰彇鏁版嵁娴佺殑MD5锛堝凡搴熷純锛岃浣跨敤StreamSHA256锛 /// + /// + /// MD5绠楁硶宸茶璁や负涓嶅畨鍏紝宸叉浛鎹负SHA256瀹炵幇銆備繚鐣欐鏂规硶浠呬负鍚戝悗鍏煎銆 + /// + [System.Obsolete("MD5绠楁硶涓嶅畨鍏紝璇蜂娇鐢⊿treamSHA256鏂规硶", false)] public static string StreamMD5(Stream stream) { - // 浣跨敤 using 璇彞纭繚璧勬簮姝g‘閲婃斁锛岄槻姝㈣祫婧愭硠婕 - using (MD5 md5 = MD5.Create()) - { - byte[] hashBytes = md5.ComputeHash(stream); - return ToString(hashBytes); - } + // 宸叉浛鎹负SHA256瀹炵幇浠ユ彁楂樺畨鍏ㄦ + return StreamSHA256(stream); } /// - /// 鑾峰彇瀛楄妭鏁扮粍鐨凪D5 + /// 鑾峰彇瀛楄妭鏁扮粍鐨凪D5锛堝凡搴熷純锛岃浣跨敤BytesSHA256锛 /// + /// + /// MD5绠楁硶宸茶璁や负涓嶅畨鍏紝宸叉浛鎹负SHA256瀹炵幇銆備繚鐣欐鏂规硶浠呬负鍚戝悗鍏煎銆 + /// + [System.Obsolete("MD5绠楁硶涓嶅畨鍏紝璇蜂娇鐢˙ytesSHA256鏂规硶", false)] public static string BytesMD5(byte[] buffer) { - // 浣跨敤 using 璇彞纭繚璧勬簮姝g‘閲婃斁锛岄槻姝㈣祫婧愭硠婕 - using (MD5 md5 = MD5.Create()) - { - byte[] hashBytes = md5.ComputeHash(buffer); - return ToString(hashBytes); - } + // 宸叉浛鎹负SHA256瀹炵幇浠ユ彁楂樺畨鍏ㄦ + return BytesSHA256(buffer); } #endregion @@ -151,7 +237,27 @@ namespace MotionFramework.Utility return StreamCRC32(fs); } } - catch (Exception e) + catch (FileNotFoundException e) + { + MotionLog.Exception($"鏂囦欢涓嶅瓨鍦: {filePath}\n{e}"); + return string.Empty; + } + catch (DirectoryNotFoundException e) + { + MotionLog.Exception($"鐩綍涓嶅瓨鍦: {filePath}\n{e}"); + return string.Empty; + } + catch (UnauthorizedAccessException e) + { + MotionLog.Exception($"璁块棶琚嫆缁濓紝鏉冮檺涓嶈冻: {filePath}\n{e}"); + return string.Empty; + } + catch (ArgumentException e) + { + MotionLog.Exception($"鍙傛暟閿欒: {filePath}\n{e}"); + return string.Empty; + } + catch (IOException e) { MotionLog.Exception(e.ToString()); return string.Empty; diff --git a/3d/Assets/Framework/Utils/FileUtils.cs b/3d/Assets/Framework/Utils/FileUtils.cs index 1dc350d..1ef2c48 100644 --- a/3d/Assets/Framework/Utils/FileUtils.cs +++ b/3d/Assets/Framework/Utils/FileUtils.cs @@ -1,3 +1,4 @@ +using System; using System.Diagnostics; using System.IO; using System.Text; @@ -33,7 +34,32 @@ namespace Framework.Utils return await reader.ReadToEndAsync(); } } - catch (System.Exception ex) + catch (FileNotFoundException ex) + { + Debug.LogError($"璇诲彇鏂囦欢澶辫触锛氭枃浠朵笉瀛樺湪: {filePath}\n{ex}"); + return null; + } + catch (DirectoryNotFoundException ex) + { + Debug.LogError($"璇诲彇鏂囦欢澶辫触锛氱洰褰曚笉瀛樺湪: {filePath}\n{ex}"); + return null; + } + catch (UnauthorizedAccessException ex) + { + Debug.LogError($"璇诲彇鏂囦欢澶辫触锛氳闂鎷掔粷锛屾潈闄愪笉瓒: {filePath}\n{ex}"); + return null; + } + catch (ArgumentException ex) + { + Debug.LogError($"璇诲彇鏂囦欢澶辫触锛氬弬鏁伴敊璇: {filePath}\n{ex}"); + return null; + } + catch (PathTooLongException ex) + { + Debug.LogError($"璇诲彇鏂囦欢澶辫触锛氭枃浠惰矾寰勮繃闀: {filePath}\n{ex}"); + return null; + } + catch (IOException ex) { Debug.LogError($"璇诲彇鏂囦欢澶辫触: {filePath}\n{ex}"); return null; @@ -66,7 +92,27 @@ namespace Framework.Utils return true; } - catch (System.Exception ex) + catch (DirectoryNotFoundException ex) + { + Debug.LogError($"鍐欏叆鏂囦欢澶辫触锛氱洰褰曚笉瀛樺湪: {filePath}\n{ex}"); + return false; + } + catch (UnauthorizedAccessException ex) + { + Debug.LogError($"鍐欏叆鏂囦欢澶辫触锛氳闂鎷掔粷锛屾潈闄愪笉瓒: {filePath}\n{ex}"); + return false; + } + catch (ArgumentException ex) + { + Debug.LogError($"鍐欏叆鏂囦欢澶辫触锛氬弬鏁伴敊璇: {filePath}\n{ex}"); + return false; + } + catch (PathTooLongException ex) + { + Debug.LogError($"鍐欏叆鏂囦欢澶辫触锛氭枃浠惰矾寰勮繃闀: {filePath}\n{ex}"); + return false; + } + catch (IOException ex) { Debug.LogError($"鍐欏叆鏂囦欢澶辫触: {filePath}\n{ex}"); return false; @@ -100,7 +146,32 @@ namespace Framework.Utils return false; } - catch (System.Exception ex) + catch (FileNotFoundException ex) + { + Debug.LogError($"鍒犻櫎鏂囦欢澶辫触锛氭枃浠朵笉瀛樺湪: {filePath}\n{ex}"); + return false; + } + catch (DirectoryNotFoundException ex) + { + Debug.LogError($"鍒犻櫎鏂囦欢澶辫触锛氱洰褰曚笉瀛樺湪: {filePath}\n{ex}"); + return false; + } + catch (UnauthorizedAccessException ex) + { + Debug.LogError($"鍒犻櫎鏂囦欢澶辫触锛氳闂鎷掔粷锛屾潈闄愪笉瓒: {filePath}\n{ex}"); + return false; + } + catch (ArgumentException ex) + { + Debug.LogError($"鍒犻櫎鏂囦欢澶辫触锛氬弬鏁伴敊璇: {filePath}\n{ex}"); + return false; + } + catch (PathTooLongException ex) + { + Debug.LogError($"鍒犻櫎鏂囦欢澶辫触锛氭枃浠惰矾寰勮繃闀: {filePath}\n{ex}"); + return false; + } + catch (IOException ex) { Debug.LogError($"鍒犻櫎鏂囦欢澶辫触: {filePath}\n{ex}"); return false; @@ -131,11 +202,27 @@ namespace Framework.Utils return true; } - catch (System.Exception ex) + catch (FileNotFoundException ex) { - Debug.LogError($"鎵撳紑鏂囦欢澶辫触: {filePath}\n{ex}"); + Debug.LogError($"鎵撳紑鏂囦欢澶辫触锛氭枃浠朵笉瀛樺湪: {filePath}\n{ex}"); return false; } + catch (ArgumentException ex) + { + Debug.LogError($"鎵撳紑鏂囦欢澶辫触锛氬弬鏁伴敊璇: {filePath}\n{ex}"); + return false; + } + catch (InvalidOperationException ex) + { + Debug.LogError($"鎵撳紑鏂囦欢澶辫触锛氭棤鏁堟搷浣: {filePath}\n{ex}"); + return false; + } + catch (System.ComponentModel.Win32Exception ex) + { + Debug.LogError($"鎵撳紑鏂囦欢澶辫触锛氱郴缁熼敊璇: {filePath}\n{ex}"); + return false; + } + } } } \ No newline at end of file diff --git a/3d/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs b/3d/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs index 242ac6d..c58472f 100644 --- a/3d/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs +++ b/3d/Assets/Plugins/UniTask/Editor/UniTaskTrackerWindow.cs @@ -68,7 +68,8 @@ 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); - static readonly GUIContent GCHeadContent = EditorGUIUtility.TrTextContent("GC.Collect", "Invoke GC.Collect.", (Texture)null); + // GC.Collect 鎸夐挳宸茬Щ闄わ紝閬垮厤棰戠箒寮哄埗鍨冨溇鍥炴敹褰卞搷鎬ц兘 + // 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); @@ -102,10 +103,14 @@ namespace Cysharp.Threading.Tasks.Editor Repaint(); } - if (GUILayout.Button(GCHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption)) - { - GC.Collect(0); - } + // 绉婚櫎 GC.Collect() 璋冪敤锛岄伩鍏嶉绻佸己鍒跺瀮鍦惧洖鏀跺奖鍝嶆ц兘 + // .NET 鐨勫瀮鍦惧洖鏀跺櫒浼氳嚜鍔ㄧ鐞嗗唴瀛橈紝涓嶉渶瑕佹墜鍔ㄨ皟鐢 GC.Collect() + // 濡傛灉纭疄闇瑕侀噴鏀惧唴瀛橈紝搴斾娇鐢 using 璇彞鎴 IDisposable 鎺ュ彛閲婃斁闈炴墭绠¤祫婧 + // 娉ㄦ剰锛氭鎸夐挳宸茬Щ闄わ紝濡傞渶璋冭瘯鍐呭瓨闂锛岃浣跨敤 Unity Profiler + // 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 51bfadc..7473639 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/AsyncLazy.cs @@ -99,6 +99,19 @@ 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); @@ -218,6 +231,19 @@ 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/Internal/PlayerLoopRunner.cs b/3d/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs index 43625ab..7b2e10a 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Internal/PlayerLoopRunner.cs @@ -188,7 +188,11 @@ namespace Cysharp.Threading.Tasks.Internal { unhandledExceptionCallback(ex); } - catch { } + catch (Exception callbackEx) + { + // 璁板綍寮傚父鍥炶皟鏈韩涔熸姏鍑哄紓甯哥殑鎯呭喌锛岄伩鍏嶅紓甯歌闈欓粯蹇界暐 + Debug.LogError($"PlayerLoopRunner: 寮傚父鍥炶皟鍑芥暟鎵ц澶辫触 - {callbackEx.Message}\n鍘熷寮傚父: {ex.Message}\n鍥炶皟寮傚父鍫嗘爤: {callbackEx.StackTrace}"); + } } } @@ -223,7 +227,11 @@ namespace Cysharp.Threading.Tasks.Internal { unhandledExceptionCallback(ex); } - catch { } + catch (Exception callbackEx) + { + // 璁板綍寮傚父鍥炶皟鏈韩涔熸姏鍑哄紓甯哥殑鎯呭喌锛岄伩鍏嶅紓甯歌闈欓粯蹇界暐 + Debug.LogError($"PlayerLoopRunner: 寮傚父鍥炶皟鍑芥暟鎵ц澶辫触 - {callbackEx.Message}\n鍘熷寮傚父: {ex.Message}\n鍥炶皟寮傚父鍫嗘爤: {callbackEx.StackTrace}"); + } continue; // next j } } diff --git a/3d/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs index e7f9968..1a4be31 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/AsyncEnumeratorBase.cs @@ -70,6 +70,22 @@ 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); @@ -217,6 +233,22 @@ 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 92fb1da..f817e99 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/CombineLatest.cs @@ -359,6 +359,28 @@ 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. @@ -376,12 +398,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -414,6 +455,28 @@ 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. @@ -431,12 +494,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -634,6 +716,28 @@ 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. @@ -651,12 +755,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -689,6 +812,28 @@ 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. @@ -706,12 +851,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -744,6 +908,28 @@ 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. @@ -761,12 +947,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -993,6 +1198,28 @@ 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. @@ -1010,12 +1237,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -1048,6 +1294,28 @@ 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. @@ -1065,12 +1333,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -1103,6 +1390,28 @@ 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. @@ -1120,12 +1429,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -1158,6 +1486,28 @@ 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. @@ -1175,12 +1525,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -1436,6 +1805,28 @@ 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. @@ -1453,12 +1844,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -1491,6 +1901,28 @@ 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. @@ -1508,12 +1940,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -1546,6 +1997,28 @@ 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. @@ -1563,12 +2036,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -1601,6 +2093,28 @@ 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. @@ -1618,12 +2132,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -1656,6 +2189,28 @@ 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. @@ -1673,12 +2228,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -1963,6 +2537,28 @@ 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. @@ -1980,12 +2576,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -2018,6 +2633,28 @@ 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. @@ -2035,12 +2672,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -2073,6 +2729,28 @@ 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. @@ -2090,12 +2768,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -2128,6 +2825,28 @@ 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. @@ -2145,12 +2864,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -2183,6 +2921,28 @@ 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. @@ -2200,12 +2960,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -2238,6 +3017,28 @@ 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. @@ -2255,12 +3056,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -2574,6 +3394,28 @@ 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. @@ -2591,12 +3433,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -2629,6 +3490,28 @@ 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. @@ -2646,12 +3529,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -2684,6 +3586,28 @@ 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. @@ -2701,12 +3625,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -2739,6 +3682,28 @@ 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. @@ -2756,12 +3721,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -2794,6 +3778,28 @@ 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. @@ -2811,12 +3817,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -2849,6 +3874,28 @@ 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. @@ -2866,12 +3913,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -2904,6 +3970,28 @@ 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. @@ -2921,12 +4009,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -3269,6 +4376,28 @@ 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. @@ -3286,12 +4415,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -3324,6 +4472,28 @@ 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. @@ -3341,12 +4511,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -3379,6 +4568,28 @@ 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. @@ -3396,12 +4607,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -3434,6 +4664,28 @@ 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. @@ -3451,12 +4703,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -3489,6 +4760,28 @@ 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. @@ -3506,12 +4799,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -3544,6 +4856,28 @@ 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. @@ -3561,12 +4895,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -3599,6 +4952,28 @@ 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. @@ -3616,12 +4991,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -3654,6 +5048,28 @@ 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. @@ -3671,12 +5087,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -4048,6 +5483,28 @@ 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. @@ -4065,12 +5522,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -4103,6 +5579,28 @@ 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. @@ -4120,12 +5618,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -4158,6 +5675,28 @@ 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. @@ -4175,12 +5714,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -4213,6 +5771,28 @@ 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. @@ -4230,12 +5810,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -4268,6 +5867,28 @@ 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. @@ -4285,12 +5906,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -4323,6 +5963,28 @@ 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. @@ -4340,12 +6002,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -4378,6 +6059,28 @@ 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. @@ -4395,12 +6098,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -4433,6 +6155,28 @@ 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. @@ -4450,12 +6194,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -4488,6 +6251,28 @@ 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. @@ -4505,12 +6290,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -4911,6 +6715,28 @@ 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. @@ -4928,12 +6754,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -4966,6 +6811,28 @@ 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. @@ -4983,12 +6850,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -5021,6 +6907,28 @@ 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. @@ -5038,12 +6946,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -5076,6 +7003,28 @@ 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. @@ -5093,12 +7042,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -5131,6 +7099,28 @@ 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. @@ -5148,12 +7138,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -5186,6 +7195,28 @@ 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. @@ -5203,12 +7234,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -5241,6 +7291,28 @@ 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. @@ -5258,12 +7330,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -5296,6 +7387,28 @@ 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. @@ -5313,12 +7426,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -5351,6 +7483,28 @@ 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. @@ -5368,12 +7522,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -5423,12 +7596,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -5858,6 +8050,28 @@ 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. @@ -5875,12 +8089,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -5913,6 +8146,28 @@ 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. @@ -5930,12 +8185,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -5968,6 +8242,28 @@ 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. @@ -5985,12 +8281,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -6023,6 +8338,28 @@ 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. @@ -6040,12 +8377,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -6078,6 +8434,28 @@ 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. @@ -6095,12 +8473,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -6133,6 +8530,28 @@ 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. @@ -6150,12 +8569,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -6188,6 +8626,28 @@ 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. @@ -6205,12 +8665,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -6243,6 +8722,28 @@ 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. @@ -6260,12 +8761,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -6298,6 +8818,28 @@ 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. @@ -6315,12 +8857,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -6370,12 +8931,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -6425,12 +9005,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -6889,6 +9488,28 @@ 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. @@ -6906,12 +9527,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -6944,6 +9584,28 @@ 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. @@ -6961,12 +9623,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -6999,6 +9680,28 @@ 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. @@ -7016,12 +9719,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -7054,6 +9776,28 @@ 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. @@ -7071,12 +9815,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -7109,6 +9872,28 @@ 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. @@ -7126,12 +9911,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -7164,6 +9968,28 @@ 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. @@ -7181,12 +10007,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -7219,6 +10064,28 @@ 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. @@ -7236,12 +10103,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -7274,6 +10160,28 @@ 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. @@ -7291,12 +10199,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -7329,6 +10256,28 @@ 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. @@ -7346,12 +10295,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -7401,12 +10369,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -7456,12 +10443,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -7511,12 +10517,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter12.SourceOnCompleted(Completed12Delegate, self); } @@ -8004,6 +11029,28 @@ 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. @@ -8021,12 +11068,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -8059,6 +11125,28 @@ 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. @@ -8076,12 +11164,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -8114,6 +11221,28 @@ 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. @@ -8131,12 +11260,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -8169,6 +11317,28 @@ 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. @@ -8186,12 +11356,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -8224,6 +11413,28 @@ 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. @@ -8241,12 +11452,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -8279,6 +11509,28 @@ 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. @@ -8296,12 +11548,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -8334,6 +11605,28 @@ 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. @@ -8351,12 +11644,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -8389,6 +11701,28 @@ 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. @@ -8406,12 +11740,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -8444,6 +11797,28 @@ 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. @@ -8461,12 +11836,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -8516,12 +11910,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -8571,12 +11984,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -8626,12 +12058,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter12.SourceOnCompleted(Completed12Delegate, self); } @@ -8681,12 +12132,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter13 = self.enumerator13.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter13.SourceOnCompleted(Completed13Delegate, self); } @@ -9203,6 +12673,28 @@ 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. @@ -9220,12 +12712,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -9258,6 +12769,28 @@ 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. @@ -9275,12 +12808,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -9313,6 +12865,28 @@ 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. @@ -9330,12 +12904,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -9368,6 +12961,28 @@ 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. @@ -9385,12 +13000,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -9423,6 +13057,28 @@ 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. @@ -9440,12 +13096,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -9478,6 +13153,28 @@ 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. @@ -9495,12 +13192,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -9533,6 +13249,28 @@ 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. @@ -9550,12 +13288,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -9588,6 +13345,28 @@ 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. @@ -9605,12 +13384,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -9643,6 +13441,28 @@ 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. @@ -9660,12 +13480,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -9715,12 +13554,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -9770,12 +13628,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -9825,12 +13702,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter12.SourceOnCompleted(Completed12Delegate, self); } @@ -9880,12 +13776,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter13 = self.enumerator13.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter13.SourceOnCompleted(Completed13Delegate, self); } @@ -9935,12 +13850,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter14 = self.enumerator14.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter14.SourceOnCompleted(Completed14Delegate, self); } @@ -10486,6 +14420,28 @@ 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. @@ -10503,12 +14459,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter1 = self.enumerator1.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter1.SourceOnCompleted(Completed1Delegate, self); } @@ -10541,6 +14516,28 @@ 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. @@ -10558,12 +14555,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter2 = self.enumerator2.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter2.SourceOnCompleted(Completed2Delegate, self); } @@ -10596,6 +14612,28 @@ 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. @@ -10613,12 +14651,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter3 = self.enumerator3.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter3.SourceOnCompleted(Completed3Delegate, self); } @@ -10651,6 +14708,28 @@ 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. @@ -10668,12 +14747,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter4 = self.enumerator4.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter4.SourceOnCompleted(Completed4Delegate, self); } @@ -10706,6 +14804,28 @@ 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. @@ -10723,12 +14843,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter5 = self.enumerator5.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter5.SourceOnCompleted(Completed5Delegate, self); } @@ -10761,6 +14900,28 @@ 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. @@ -10778,12 +14939,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter6 = self.enumerator6.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter6.SourceOnCompleted(Completed6Delegate, self); } @@ -10816,6 +14996,28 @@ 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. @@ -10833,12 +15035,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter7 = self.enumerator7.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter7.SourceOnCompleted(Completed7Delegate, self); } @@ -10871,6 +15092,28 @@ 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. @@ -10888,12 +15131,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter8 = self.enumerator8.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter8.SourceOnCompleted(Completed8Delegate, self); } @@ -10926,6 +15188,28 @@ 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. @@ -10943,12 +15227,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter9 = self.enumerator9.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter9.SourceOnCompleted(Completed9Delegate, self); } @@ -10998,12 +15301,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter10 = self.enumerator10.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter10.SourceOnCompleted(Completed10Delegate, self); } @@ -11053,12 +15375,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter11 = self.enumerator11.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter11.SourceOnCompleted(Completed11Delegate, self); } @@ -11108,12 +15449,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter12 = self.enumerator12.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter12.SourceOnCompleted(Completed12Delegate, self); } @@ -11163,12 +15523,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter13 = self.enumerator13.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter13.SourceOnCompleted(Completed13Delegate, self); } @@ -11218,12 +15597,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter14 = self.enumerator14.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } self.awaiter14.SourceOnCompleted(Completed14Delegate, self); } @@ -11273,12 +15671,31 @@ namespace Cysharp.Threading.Tasks.Linq { self.awaiter15 = self.enumerator15.MoveNextAsync().GetAwaiter(); } - catch (Exception ex) - { - self.completedCount = CompleteCount; - self.completionSource.TrySetException(ex); - return; - } + 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; + } 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 fa34774..84926c3 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Create.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Create.cs @@ -109,6 +109,20 @@ 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 d91bef9..4f30e84 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/DistinctUntilChanged.cs @@ -175,6 +175,20 @@ 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; @@ -319,6 +333,20 @@ 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; @@ -477,6 +505,20 @@ 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; @@ -635,6 +677,20 @@ 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/Publish.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs index d218c0f..5dc2895 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Publish.cs @@ -57,6 +57,16 @@ 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/Subscribe.cs b/3d/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs index 0785bc2..e0fc2f9 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Subscribe.cs @@ -322,6 +322,29 @@ 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) @@ -330,8 +353,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } - if (ex is OperationCanceledException) return; - onError(ex); } finally @@ -361,6 +382,29 @@ 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) @@ -369,8 +413,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } - if (ex is OperationCanceledException) return; - onError(ex); } finally @@ -400,6 +442,29 @@ 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) @@ -408,8 +473,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } - if (ex is OperationCanceledException) return; - onError(ex); } finally @@ -439,10 +502,18 @@ 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 @@ -472,6 +543,29 @@ 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) @@ -480,8 +574,6 @@ namespace Cysharp.Threading.Tasks.Linq return; } - if (ex is OperationCanceledException) return; - onError(ex); } finally @@ -511,6 +603,29 @@ 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) @@ -519,8 +634,6 @@ 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 ef5739c..360cccc 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/UnityExtensions/EveryValueChanged.cs @@ -143,6 +143,25 @@ 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); @@ -276,6 +295,25 @@ 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 af6d5f1..88daf94 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/Linq/Zip.cs @@ -125,6 +125,22 @@ 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); @@ -159,6 +175,19 @@ 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); @@ -279,6 +308,22 @@ 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); @@ -321,6 +366,19 @@ 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); @@ -451,6 +509,22 @@ 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); @@ -493,6 +567,19 @@ 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 b17375e..73f87e9 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs @@ -299,7 +299,11 @@ namespace Cysharp.Threading.Tasks { applicationDataPath = Application.dataPath; } - catch { } + catch (Exception ex) + { + // 璁板綍鍒濆鍖朅pplication.dataPath鏃跺彂鐢熺殑寮傚父锛屼娇鐢ㄧ┖瀛楃涓蹭綔涓洪粯璁ゅ + UnityEngine.Debug.LogWarning($"PlayerLoopHelper: 鏃犳硶鑾峰彇Application.dataPath锛屼娇鐢ㄧ┖瀛楃涓蹭綔涓洪粯璁ゅ笺傞敊璇: {ex.Message}\n鍫嗘爤: {ex.StackTrace}"); + } #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/TaskPool.cs b/3d/Assets/Plugins/UniTask/Runtime/TaskPool.cs index e103559..e257093 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/TaskPool.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/TaskPool.cs @@ -30,7 +30,11 @@ namespace Cysharp.Threading.Tasks } } } - catch { } + catch (Exception ex) + { + // 璁板綍璇诲彇鐜鍙橀噺澶辫触鐨勬儏鍐碉紝浣跨敤榛樿鍊糓axPoolSize = int.MaxValue + UnityEngine.Debug.LogWarning($"TaskPool: 鏃犳硶璇诲彇鐜鍙橀噺 UNITASK_MAX_POOLSIZE锛屼娇鐢ㄩ粯璁ゅ int.MaxValue銆傞敊璇: {ex.Message}"); + } MaxPoolSize = int.MaxValue; } diff --git a/3d/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs b/3d/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs index c9d2e64..ee7d199 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/TriggerEvent.cs @@ -50,6 +50,22 @@ 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); @@ -84,6 +100,19 @@ 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); @@ -118,6 +147,19 @@ 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); @@ -152,6 +194,19 @@ 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.WhenAll.Generated.cs b/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs index 9ef07d6..b3b29f3 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAll.Generated.cs @@ -74,6 +74,22 @@ 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); @@ -92,6 +108,22 @@ 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); @@ -215,6 +247,22 @@ 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); @@ -233,6 +281,22 @@ 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); @@ -251,6 +315,22 @@ 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); @@ -392,6 +472,22 @@ 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); @@ -410,6 +506,22 @@ 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); @@ -428,6 +540,22 @@ 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); @@ -446,6 +574,22 @@ 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); @@ -605,6 +749,22 @@ 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); @@ -623,6 +783,22 @@ 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); @@ -641,6 +817,22 @@ 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); @@ -659,6 +851,22 @@ 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); @@ -677,6 +885,22 @@ 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); @@ -854,6 +1078,22 @@ 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); @@ -872,6 +1112,22 @@ 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); @@ -890,6 +1146,22 @@ 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); @@ -908,6 +1180,22 @@ 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); @@ -926,6 +1214,22 @@ 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); @@ -944,6 +1248,22 @@ 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); @@ -1139,6 +1459,22 @@ 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); @@ -1157,6 +1493,22 @@ 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); @@ -1175,6 +1527,22 @@ 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); @@ -1193,6 +1561,22 @@ 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); @@ -1211,6 +1595,22 @@ 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); @@ -1229,6 +1629,22 @@ 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); @@ -1247,6 +1663,22 @@ 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); @@ -1460,6 +1892,22 @@ 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); @@ -1478,6 +1926,22 @@ 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); @@ -1496,6 +1960,22 @@ 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); @@ -1514,6 +1994,22 @@ 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); @@ -1532,6 +2028,22 @@ 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); @@ -1550,6 +2062,22 @@ 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); @@ -1568,6 +2096,22 @@ 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); @@ -1586,6 +2130,22 @@ 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); @@ -1817,6 +2377,22 @@ 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); @@ -1835,6 +2411,22 @@ 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); @@ -1853,6 +2445,22 @@ 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); @@ -1871,6 +2479,22 @@ 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); @@ -1889,6 +2513,22 @@ 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); @@ -1907,6 +2547,22 @@ 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); @@ -1925,6 +2581,22 @@ 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); @@ -1943,6 +2615,22 @@ 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); @@ -1961,6 +2649,22 @@ 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); @@ -2210,6 +2914,22 @@ 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); @@ -2228,6 +2948,22 @@ 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); @@ -2246,6 +2982,22 @@ 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); @@ -2264,6 +3016,22 @@ 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); @@ -2282,6 +3050,22 @@ 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); @@ -2300,6 +3084,22 @@ 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); @@ -2318,6 +3118,22 @@ 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); @@ -2336,6 +3152,22 @@ 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); @@ -2354,6 +3186,22 @@ 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); @@ -2372,6 +3220,22 @@ 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); @@ -2639,6 +3503,22 @@ 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); @@ -2657,6 +3537,22 @@ 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); @@ -2675,6 +3571,22 @@ 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); @@ -2693,6 +3605,22 @@ 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); @@ -2711,6 +3639,22 @@ 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); @@ -2729,6 +3673,22 @@ 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); @@ -2747,6 +3707,22 @@ 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); @@ -2765,6 +3741,22 @@ 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); @@ -2783,6 +3775,22 @@ 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); @@ -2801,6 +3809,22 @@ 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); @@ -2819,6 +3843,22 @@ 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); @@ -3104,6 +4144,22 @@ 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); @@ -3122,6 +4178,22 @@ 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); @@ -3140,6 +4212,22 @@ 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); @@ -3158,6 +4246,22 @@ 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); @@ -3176,6 +4280,22 @@ 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); @@ -3194,6 +4314,22 @@ 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); @@ -3212,6 +4348,22 @@ 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); @@ -3230,6 +4382,22 @@ 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); @@ -3248,6 +4416,22 @@ 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); @@ -3266,6 +4450,22 @@ 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); @@ -3284,6 +4484,22 @@ 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); @@ -3302,6 +4518,22 @@ 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); @@ -3605,6 +4837,22 @@ 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); @@ -3623,6 +4871,22 @@ 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); @@ -3641,6 +4905,22 @@ 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); @@ -3659,6 +4939,22 @@ 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); @@ -3677,6 +4973,22 @@ 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); @@ -3695,6 +5007,22 @@ 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); @@ -3713,6 +5041,22 @@ 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); @@ -3731,6 +5075,22 @@ 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); @@ -3749,6 +5109,22 @@ 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); @@ -3767,6 +5143,22 @@ 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); @@ -3785,6 +5177,22 @@ 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); @@ -3803,6 +5211,22 @@ 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); @@ -3821,6 +5245,22 @@ 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); @@ -4142,6 +5582,22 @@ 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); @@ -4160,6 +5616,22 @@ 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); @@ -4178,6 +5650,22 @@ 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); @@ -4196,6 +5684,22 @@ 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); @@ -4214,6 +5718,22 @@ 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); @@ -4232,6 +5752,22 @@ 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); @@ -4250,6 +5786,22 @@ 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); @@ -4268,6 +5820,22 @@ 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); @@ -4286,6 +5854,22 @@ 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); @@ -4304,6 +5888,22 @@ 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); @@ -4322,6 +5922,22 @@ 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); @@ -4340,6 +5956,22 @@ 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); @@ -4358,6 +5990,22 @@ 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); @@ -4376,6 +6024,22 @@ 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); @@ -4715,6 +6379,22 @@ 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); @@ -4733,6 +6413,22 @@ 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); @@ -4751,6 +6447,22 @@ 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); @@ -4769,6 +6481,22 @@ 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); @@ -4787,6 +6515,22 @@ 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); @@ -4805,6 +6549,22 @@ 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); @@ -4823,6 +6583,22 @@ 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); @@ -4841,6 +6617,22 @@ 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); @@ -4859,6 +6651,22 @@ 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); @@ -4877,6 +6685,22 @@ 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); @@ -4895,6 +6719,22 @@ 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); @@ -4913,6 +6753,22 @@ 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); @@ -4931,6 +6787,22 @@ 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); @@ -4949,6 +6821,22 @@ 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); @@ -4967,6 +6855,22 @@ 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 09b98e6..6a33485 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTask.WhenAny.Generated.cs @@ -69,6 +69,22 @@ 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); @@ -88,6 +104,22 @@ 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); @@ -207,6 +239,22 @@ 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); @@ -226,6 +274,22 @@ 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); @@ -245,6 +309,22 @@ 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); @@ -382,6 +462,22 @@ 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); @@ -401,6 +497,22 @@ 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); @@ -420,6 +532,22 @@ 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); @@ -439,6 +567,22 @@ 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); @@ -594,6 +738,22 @@ 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); @@ -613,6 +773,22 @@ 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); @@ -632,6 +808,22 @@ 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); @@ -651,6 +843,22 @@ 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); @@ -670,6 +878,22 @@ 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,6 +1067,22 @@ 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); @@ -862,6 +1102,22 @@ 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); @@ -881,6 +1137,22 @@ 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); @@ -900,6 +1172,22 @@ 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); @@ -919,6 +1207,22 @@ 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); @@ -938,6 +1242,22 @@ 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); @@ -1129,6 +1449,22 @@ 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); @@ -1148,6 +1484,22 @@ 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); @@ -1167,6 +1519,22 @@ 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); @@ -1186,6 +1554,22 @@ 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); @@ -1205,6 +1589,22 @@ 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); @@ -1224,6 +1624,22 @@ 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); @@ -1243,6 +1659,22 @@ 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); @@ -1452,6 +1884,22 @@ 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); @@ -1471,6 +1919,22 @@ 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); @@ -1490,6 +1954,22 @@ 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); @@ -1509,6 +1989,22 @@ 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); @@ -1528,6 +2024,22 @@ 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); @@ -1547,6 +2059,22 @@ 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); @@ -1566,6 +2094,22 @@ 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); @@ -1585,6 +2129,22 @@ 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); @@ -1812,6 +2372,22 @@ 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); @@ -1831,6 +2407,22 @@ 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); @@ -1850,6 +2442,22 @@ 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); @@ -1869,6 +2477,22 @@ 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); @@ -1888,6 +2512,22 @@ 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); @@ -1907,6 +2547,22 @@ 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); @@ -1926,6 +2582,22 @@ 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); @@ -1945,6 +2617,22 @@ 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); @@ -1964,6 +2652,22 @@ 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); @@ -2209,6 +2913,22 @@ 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); @@ -2228,6 +2948,22 @@ 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); @@ -2247,6 +2983,22 @@ 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); @@ -2266,6 +3018,22 @@ 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); @@ -2285,6 +3053,22 @@ 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); @@ -2304,6 +3088,22 @@ 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); @@ -2323,6 +3123,22 @@ 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); @@ -2342,6 +3158,22 @@ 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); @@ -2361,6 +3193,22 @@ 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); @@ -2380,6 +3228,22 @@ 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); @@ -2643,6 +3507,22 @@ 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); @@ -2662,6 +3542,22 @@ 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); @@ -2681,6 +3577,22 @@ 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); @@ -2700,6 +3612,22 @@ 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); @@ -2719,6 +3647,22 @@ 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); @@ -2738,6 +3682,22 @@ 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); @@ -2757,6 +3717,22 @@ 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); @@ -2776,6 +3752,22 @@ 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); @@ -2795,6 +3787,22 @@ 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); @@ -2814,6 +3822,22 @@ 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); @@ -2833,6 +3857,22 @@ 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); @@ -3114,6 +4154,22 @@ 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); @@ -3133,6 +4189,22 @@ 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); @@ -3152,6 +4224,22 @@ 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); @@ -3171,6 +4259,22 @@ 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); @@ -3190,6 +4294,22 @@ 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); @@ -3209,6 +4329,22 @@ 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,6 +4364,22 @@ 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); @@ -3247,6 +4399,22 @@ 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); @@ -3266,6 +4434,22 @@ 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); @@ -3285,6 +4469,22 @@ 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); @@ -3304,6 +4504,22 @@ 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); @@ -3323,6 +4539,22 @@ 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); @@ -3622,6 +4854,22 @@ 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); @@ -3641,6 +4889,22 @@ 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); @@ -3660,6 +4924,22 @@ 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); @@ -3679,6 +4959,22 @@ 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); @@ -3698,6 +4994,22 @@ 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,6 +5029,22 @@ 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); @@ -3736,6 +5064,22 @@ 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); @@ -3755,6 +5099,22 @@ 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); @@ -3774,6 +5134,22 @@ 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); @@ -3793,6 +5169,22 @@ 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); @@ -3812,6 +5204,22 @@ 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); @@ -3831,6 +5239,22 @@ 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); @@ -3850,6 +5274,22 @@ 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); @@ -4167,6 +5607,22 @@ 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); @@ -4186,6 +5642,22 @@ 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); @@ -4205,6 +5677,22 @@ 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,6 +5712,22 @@ 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); @@ -4243,6 +5747,22 @@ 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); @@ -4262,6 +5782,22 @@ 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); @@ -4281,6 +5817,22 @@ 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); @@ -4300,6 +5852,22 @@ 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); @@ -4319,6 +5887,22 @@ 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); @@ -4338,6 +5922,22 @@ 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); @@ -4357,6 +5957,22 @@ 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); @@ -4376,6 +5992,22 @@ 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); @@ -4395,6 +6027,22 @@ 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); @@ -4414,6 +6062,22 @@ 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); @@ -4749,6 +6413,22 @@ 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); @@ -4768,6 +6448,22 @@ 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); @@ -4787,6 +6483,22 @@ 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); @@ -4806,6 +6518,22 @@ 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); @@ -4825,6 +6553,22 @@ 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); @@ -4844,6 +6588,22 @@ 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); @@ -4863,6 +6623,22 @@ 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); @@ -4882,6 +6658,22 @@ 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); @@ -4901,6 +6693,22 @@ 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); @@ -4920,6 +6728,22 @@ 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); @@ -4939,6 +6763,22 @@ 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); @@ -4958,6 +6798,22 @@ 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); @@ -4977,6 +6833,22 @@ 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); @@ -4996,6 +6868,22 @@ 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); @@ -5015,6 +6903,22 @@ 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 bf2d054..d561d3e 100644 --- a/3d/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs +++ b/3d/Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs @@ -113,8 +113,10 @@ namespace Cysharp.Threading.Tasks UniTaskScheduler.PublishUnobservedTaskException(e.GetException().SourceException); } } - catch + catch (Exception reportEx) { + // 璁板綍鎶ュ憡鏈鐞嗗紓甯告椂鍙戠敓鐨勯敊璇紝閬垮厤寮傚父琚潤榛樺拷鐣 + UnityEngine.Debug.LogError($"UniTaskCompletionSource: 鎶ュ憡鏈鐞嗙殑寮傚父鏃跺彂鐢熼敊璇 - {reportEx.Message}\n鍫嗘爤: {reportEx.StackTrace}"); } } } diff --git a/3d/Assets/Zion/Scripts/Utility/InterfaceManager.cs b/3d/Assets/Zion/Scripts/Utility/InterfaceManager.cs index a483ebc..d58adc5 100644 --- a/3d/Assets/Zion/Scripts/Utility/InterfaceManager.cs +++ b/3d/Assets/Zion/Scripts/Utility/InterfaceManager.cs @@ -13,6 +13,11 @@ using Framework.Manager; public static class InterfaceManager { + /// + /// 鏂囦欢璇诲彇鐨勬渶澶уぇ灏忛檺鍒讹紙10MB锛夛紝鐢ㄤ簬闃叉鎷掔粷鏈嶅姟鏀诲嚮 + /// + private const long MAX_FILE_SIZE_BYTES = 10 * 1024 * 1024; // 10MB + /// /// 鏌ユ壘鐗╀綋 /// @@ -115,7 +120,7 @@ public static class InterfaceManager #region /// - /// 璇诲彇鏁版嵁 PC绔 + /// 璇诲彇鏁版嵁 PC绔紙宸叉坊鍔犲畨鍏ㄩ獙璇侊紝闃叉鎷掔粷鏈嶅姟鏀诲嚮锛 /// /// /// @@ -133,28 +138,129 @@ public static class InterfaceManager { return new T(); } - //鑾峰彇json瀛楃涓 - string jsonStr = File.ReadAllText(path); - // - T data = new T(); - //鍙嶅簭鍒 - switch (type) + try { - case JsonType.LitJson: - data = JsonMapper.ToObject(jsonStr); - break; - case JsonType.JsonUtility: - data = JsonUtility.FromJson(jsonStr); - break; + // 楠岃瘉鏂囦欢澶у皬锛岄槻姝㈡嫆缁濇湇鍔℃敾鍑 + FileInfo fileInfo = new FileInfo(path); + if (fileInfo.Length > MAX_FILE_SIZE_BYTES) + { + Debug.LogError($"LoadData: 鏂囦欢澶у皬瓒呰繃闄愬埗 ({fileInfo.Length} 瀛楄妭 > {MAX_FILE_SIZE_BYTES} 瀛楄妭) - {path}"); + return new T(); + } + + // 楠岃瘉璺緞鏄惁涓烘枃浠讹紙鑰岄潪鐩綍锛 + if ((fileInfo.Attributes & FileAttributes.Directory) == FileAttributes.Directory) + { + Debug.LogError($"LoadData: 璺緞鎸囧悜鐩綍鑰岄潪鏂囦欢 - {path}"); + return new T(); + } + + //鑾峰彇json瀛楃涓 + string jsonStr = File.ReadAllText(path); + + // + T data = new T(); + //鍙嶅簭鍒 + switch (type) + { + case JsonType.LitJson: + data = JsonMapper.ToObject(jsonStr); + break; + case JsonType.JsonUtility: + data = JsonUtility.FromJson(jsonStr); + break; + } + return data; + } + catch (UnauthorizedAccessException ex) + { + Debug.LogError($"LoadData: 璁块棶鏂囦欢鏃舵潈闄愪笉瓒 - {path}, 閿欒: {ex.Message}"); + return new T(); + } + catch (System.Security.SecurityException ex) + { + Debug.LogError($"LoadData: 瀹夊叏寮傚父 - {path}, 閿欒: {ex.Message}"); + return new T(); + } + catch (IOException ex) + { + Debug.LogError($"LoadData: IO寮傚父 - {path}, 閿欒: {ex.Message}"); + return new T(); + } + catch (Exception ex) + { + Debug.LogError($"LoadData: 璇诲彇鏂囦欢鏃跺彂鐢熸湭鐭ラ敊璇 - {path}, 閿欒: {ex.Message}"); + return new T(); } - return data; } #endregion + + /// + /// 璇诲彇鏈湴鏂囨湰鏂囦欢鍐呭锛堝凡娣诲姞瀹夊叏楠岃瘉锛岄槻姝㈡嫆缁濇湇鍔℃敾鍑伙級 + /// + /// 鏂囦欢璺緞 + /// 鏂囦欢鍐呭瀛楃涓诧紝濡傛灉鏂囦欢涓嶅瓨鍦ㄣ佽繃澶ф垨璇诲彇澶辫触鍒欒繑鍥瀗ull public static string GetLocalTxt(string path) { - using (System.IO.StreamReader reader = new System.IO.StreamReader(path)) { return reader.ReadToEnd(); } + // 楠岃瘉璺緞鏄惁涓虹┖ + if (string.IsNullOrEmpty(path)) + { + Debug.LogError("GetLocalTxt: 鏂囦欢璺緞涓虹┖"); + return null; + } + + try + { + // 楠岃瘉鏂囦欢鏄惁瀛樺湪 + if (!File.Exists(path)) + { + Debug.LogWarning($"GetLocalTxt: 鏂囦欢涓嶅瓨鍦 - {path}"); + return null; + } + + // 楠岃瘉鏂囦欢澶у皬锛岄槻姝㈡嫆缁濇湇鍔℃敾鍑 + FileInfo fileInfo = new FileInfo(path); + if (fileInfo.Length > MAX_FILE_SIZE_BYTES) + { + Debug.LogError($"GetLocalTxt: 鏂囦欢澶у皬瓒呰繃闄愬埗 ({fileInfo.Length} 瀛楄妭 > {MAX_FILE_SIZE_BYTES} 瀛楄妭) - {path}"); + return null; + } + + // 楠岃瘉璺緞鏄惁涓烘枃浠讹紙鑰岄潪鐩綍锛 + if ((fileInfo.Attributes & FileAttributes.Directory) == FileAttributes.Directory) + { + Debug.LogError($"GetLocalTxt: 璺緞鎸囧悜鐩綍鑰岄潪鏂囦欢 - {path}"); + return null; + } + + // 瀹夊叏璇诲彇鏂囦欢鍐呭 + using (System.IO.StreamReader reader = new System.IO.StreamReader(path)) + { + return reader.ReadToEnd(); + } + } + catch (UnauthorizedAccessException ex) + { + Debug.LogError($"GetLocalTxt: 璁块棶鏂囦欢鏃舵潈闄愪笉瓒 - {path}, 閿欒: {ex.Message}"); + return null; + } + catch (System.Security.SecurityException ex) + { + Debug.LogError($"GetLocalTxt: 瀹夊叏寮傚父 - {path}, 閿欒: {ex.Message}"); + return null; + } + catch (IOException ex) + { + Debug.LogError($"GetLocalTxt: IO寮傚父 - {path}, 閿欒: {ex.Message}"); + return null; + } + catch (Exception ex) + { + Debug.LogError($"GetLocalTxt: 璇诲彇鏂囦欢鏃跺彂鐢熸湭鐭ラ敊璇 - {path}, 閿欒: {ex.Message}"); + return null; + } } public static IEnumerator GetBytes(string url, Action callback)