TransferDriver Class

This class is the main entry point for starting transfers. The same instance should be reused for many executions, though not concurrently. This class allocates native memory (the amount depends on the parameters passed to ctor) which is held until disposal.

Definition

Namespace: Quine.FileTransfer
Assembly: Quine.FileTransfer (in Quine.FileTransfer.dll) Version: 1.0.0+6efd94d5454131cfac18f827c2a4172cb83f1e24
C#
public sealed class TransferDriver : IDisposable
Inheritance
Object    TransferDriver
Implements
IDisposable

Constructors

TransferDriver Constructor. Initializes properties that are fixed across individual executions.

Properties

Consumers Consumer sides of the transfer.
HasherFactory If this delegate is provided, a reference hash will be computed while reading the file. The hash can be obtained through ReferenceHash property after completed execution. In addition, when VerifyHash, each worker will perform a 2nd-pass hash verification.
Producer Producer side of the transfer.
ReferenceHash Hash value computed during file reading.
VerifyHash If true and HasherFactory has been provided, the file's hash will be verified after a successfully completed transfer.

Methods

Cancel Cancels an ongoing transfer independently from the token passed to ExecuteAsync(CancellationToken). This is a no-op if the transfer has already finished.
DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
ExecuteAsync Executes the transfer as defined by the public properties.

See Also