public static async Task <bool> TryDeleteTaskAsync <T>(this ITaskStore store) where T : ITask { var task = await store.GetTaskByTypeAsync(typeof(T)); if (task != null) { await store.DeleteTaskAsync(task); return(true); } return(false); }
public static Task <ITaskDescriptor> GetTaskByTypeAsync(this ITaskStore store, Type taskType) { Guard.NotNull(taskType, nameof(taskType)); return(store.GetTaskByTypeAsync(taskType.AssemblyQualifiedNameWithoutVersion())); }
public static Task <ITaskDescriptor> GetTaskByTypeAsync <T>(this ITaskStore store) where T : ITask { return(store.GetTaskByTypeAsync(typeof(T))); }