4using System.Threading.Tasks;
43 Func<ErrorCode?> activationCallback,
44 Func<CancellationToken, Task<Stream>>? streamProvider,
48 ActivationCallback = activationCallback ??
throw new ArgumentNullException(nameof(activationCallback));
50 FilePath = filePath ??
throw new ArgumentNullException(nameof(filePath));
Represents a file on disk to be downloaded.
bool ShareWrite
If the file read stream should be allowed to share writes. If this is set, the entire file will be bu...
string FilePath
The full path to the file on disk to download.
FileDownloadProvider(Func< ErrorCode?> activationCallback, Func< CancellationToken, Task< Stream > >? streamProvider, string filePath, bool shareWrite)
Initializes a new instance of the FileDownloadProvider class.
Func< CancellationToken, Task< Stream > >? StreamProvider
A Func<T, TResult> to specially provide a Task<TResult> returning the Stream of the file download....
Func< ErrorCode?> ActivationCallback
A Func<TResult> to run before providing the download. If it returns a non-null ErrorCode,...