public async Task <Result> PauseDownloadTask(int downloadTaskId) { if (downloadTaskId <= 0) { return(ResultExtensions.IsInvalidId(nameof(downloadTaskId), downloadTaskId).LogWarning()); } return(await _downloadManager.PauseDownload(downloadTaskId)); }
public async Task <Result <bool> > RestartDownloadTask(int downloadTaskId) { if (downloadTaskId <= 0) { return(ResultExtensions.IsInvalidId(nameof(downloadTaskId), downloadTaskId).LogWarning()); } return(await _downloadManager.RestartDownloadAsync(downloadTaskId)); }