StorageCandidate

Summary: Describe a stored copy or a read failure during backup recovery.

Description

A storage backend that implements IBackupStorage passes StorageCandidate instances to Save System. A candidate identifies its copy kind and supplies bytes or a read exception.

Namespace Gley.SaveSystem.

Declaration

C#
public class StorageCandidate

Members

MemberTypeDescription
StorageCandidateConstructorStorageCandidate(CandidateKind kind, byte[] data)
Creates a readable candidate with its saved bytes.
StorageCandidateConstructorStorageCandidate(CandidateKind kind, Exception readError)
Creates a candidate whose bytes could not be read.
KindCandidateKindWhether this is the main, temporary, or backup copy.
Databyte[]Stored bytes for a readable candidate.
ReadErrorExceptionThe read error, or null for a readable candidate.
IsReadableboolTrue when there is no read error.

Example

When a custom store finds a backup copy, return a candidate with kind Backup and its bytes. If the read fails, return a candidate with that kind and the exception.

On This Page