UnbufferedFile Class

Common implementation for file reader and writer. Uses unbuffered ("direct") file I/O.

Definition

Namespace: Quine.FileTransfer
Assembly: Quine.FileTransfer (in Quine.FileTransfer.dll) Version: 1.0.0+6efd94d5454131cfac18f827c2a4172cb83f1e24
C#
public abstract class UnbufferedFile : ITransferWorker
Inheritance
Object    UnbufferedFile
Derived
Implements
ITransferWorker

Constructors

UnbufferedFileInitializes a new instance of the UnbufferedFile class

Properties

FilePath Fully-qualified path to the file.
MaxConcurrency File I/O currently supports only serial operation.
State Managed by TransferDriver. The implementation should initialize this property to null. The driver injects a valid instance before execution starts. After execution, the instance may be inspected for errors.

Methods

FinalizeAsync

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.

InitializeAsync Initializes the worker for the next transfer, acquiring any needed resources. Failure must be signaled by throwing an exception. This method is always invoked, once per transfer.

See Also