ITransferWorkerFinalizeAsync Method
Finalizes the worker by computing the verification hash and disposing of any previously acquired resources.
Failure must be signaled by throwing an exception.
This method is always invoked, once per transfer. It is invoked regardless of whether the worker encountered
an error or not (Exception).
IMPORTANT: Resources should be disposed even if cancellation is requested.
Namespace: Quine.FileTransferAssembly: Quine.FileTransfer (in Quine.FileTransfer.dll) Version: 1.0.0+6efd94d5454131cfac18f827c2a4172cb83f1e24
Task<byte[]?> FinalizeAsync(
ITransferHasher? transferHasher,
ITransferBuffer buffer
)
- transferHasher ITransferHasher
-
A ready hasher instance to use for hash computation. If null, hash verification must be skipped.
This parameter is guaranteed to be null if the worker encountered errors previously.
- buffer ITransferBuffer
- Buffer to use for reading in file data for hashing.
TaskByteVerification hash, or
null if verification was not requested.