namespace XFEExtension.NetCore.WebExtension;
///
/// 字符下载事件
///
public class FileDownloadedEventArgs(byte[] currentBuffer, long downloadedBufferSize, long? totalBufferSize, long currentSegmentTotalBufferSize, long currentSegmentDownloadedBufferSize, int currentSegmentIndex, bool downloaded) : EventArgs
{
///
/// 当前下载到的字节
///
public byte[] CurrentBuffer { get; } = currentBuffer;
///
/// 总共已下载的字节大小
///
public long DownloadedBufferSize { get; } = downloadedBufferSize;
///
/// 总共需要下载的字节大小
///
public long? TotalBufferSize { get; } = totalBufferSize;
///
/// 当前节的总计需要下载的字节大小
///
public long CurrentSegmentTotalBufferSize { get; } = currentSegmentTotalBufferSize;
///
/// 当前节的已下载的字节大小
///
public long CurrentSegmentDownloadedBufferSize { get; } = currentSegmentDownloadedBufferSize;
///
/// 当前节的索引
///
public int CurrentSegmentIndex { get; } = currentSegmentIndex;
///
/// 是否下载完成
///
public bool Downloaded { get; } = downloaded;
}