diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs index e8dfb5f5..60f246dd 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/Linq/ForEach.cs @@ -22,6 +22,22 @@ public static UniTask ForEachAsync(this IUniTaskAsyncEnumerableObsolete(Error), Use Use ForEachAwaitAsync instead. + [Obsolete("Use ForEachAwaitAsync instead.", true)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public static UniTask ForEachAsync(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + { + throw new NotSupportedException("Use ForEachAwaitAsync instead."); + } + + /// Obsolete(Error), Use Use ForEachAwaitAsync instead. + [Obsolete("Use ForEachAwaitAsync instead.", true)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] + public static UniTask ForEachAsync(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) + { + throw new NotSupportedException("Use ForEachAwaitAsync instead."); + } + public static UniTask ForEachAwaitAsync(this IUniTaskAsyncEnumerable source, Func action, CancellationToken cancellationToken = default) { Error.ThrowArgumentNullException(source, nameof(source));