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

17 lines
394 B
C#

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();
}
}