CodeLiturgy.Dashboard/BlueWest/Core/Coroutines/Coroutine.cs

17 lines
394 B
C#
Raw Normal View History

2021-12-06 02:49:27 +03:00
using System.Collections;
using System.Runtime.InteropServices;
namespace BlueWest.Coroutines
{
public sealed class Coroutine : CustomYieldInstruction
{
private readonly IEnumerator routine;
public Coroutine(IEnumerator routine)
{
this.routine = routine;
}
public override bool keepWaiting => routine.MoveNext();
}
}