/// <summary> /// Adds an interator block to a executor as a coroutine. /// </summary> /// <param name="executor">The executor.</param> /// <param name="block"> The iterator block of the coroutine </param> /// <returns>The created coroutine which executes <paramref name="block"/> when resumed by <paramref name="executor"/>.</returns> public static Coroutine Add(this IExecutor executor, IEnumerator block) { Coroutine c = new Coroutine(block); executor.Add(c); return(c); }
public static Coroutine Add(this IExecutor executor, IEnumerator handle) { Coroutine c = new Coroutine(handle); executor.Add(c); return(c); }
public static void Execute(this IExecutor executor, IFileSource fileSource) { Assert.IsTrue(executor.Add(fileSource), "The file source could not be added."); }