A small helper class stub that was intended to download a file with progress reporting. It declares a ProgressChanged event, a constructor, StartDownload method and implements IDisposable, but the StartDownload method immediately throws NotSupportedException with a message disabling downloads in the s&box port.
#nullable enable annotations
namespace LichessNET.Database;
internal class HttpClientDownloadWithProgress : IDisposable
{
public delegate void ProgressChangedHandler(long? totalFileSize, long totalBytesDownloaded,
double? progressPercentage);
public HttpClientDownloadWithProgress(string downloadUrl, string destinationFilePath)
{
}
public event ProgressChangedHandler ProgressChanged;
public Task StartDownload()
{
ProgressChanged?.Invoke(0, 0, 0);
throw new NotSupportedException("Lichess database file downloads are disabled in the whitelist-safe s&box port.");
}
public void Dispose()
{
}
}