mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
20 lines
430 B
C#
20 lines
430 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Remotely.Shared.Extensions;
|
|
|
|
public static class IEnumerableExtensions
|
|
{
|
|
public static async IAsyncEnumerable<T> ToAsyncEnumerable<T>(this IEnumerable<T> source)
|
|
{
|
|
foreach (var item in source)
|
|
{
|
|
yield return item;
|
|
await Task.Yield();
|
|
}
|
|
}
|
|
}
|