public static void ExecuteAndCancel(this ITask task, params Action[] actions) { if (task.Execute(actions)) task.Cancel(); }