23 lines
622 B
C#
23 lines
622 B
C#
using System;
|
|
using System.Net.Http;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using AlayaCore.Models.Progress;
|
|
using AlayaCore.Models.Results;
|
|
|
|
namespace AlayaCore.Abstractions.Interfaces.Services
|
|
{
|
|
public interface IDownloadService
|
|
{
|
|
Task<DownloadResult> DownloadFileAsync(
|
|
Uri sourceUri,
|
|
string destinationPath,
|
|
string sha512Hash,
|
|
IProgress<DownloadProgress>? progress = null,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
bool VerifyFileHash(
|
|
string filePath,
|
|
string sha512Hash);
|
|
}
|
|
} |