public static async Task WorkAsync(this IExecutable executable) { IExecutable current = executable; while (current != null) { IExecutor executor = current.GetExecutor(); current = await executor.ExecuteAsync(); } }
public static void Work(this IExecutable executable) { IExecutable current = executable; while (current != null) { IExecutor executor = current.GetExecutor(); current = executor.Execute(); } }