Class SnapshotStorage
Handles file system operations for domain snapshots.
public sealed class SnapshotStorage
- Inheritance
-
SnapshotStorage
- Inherited Members
Constructors
SnapshotStorage(SnapshotOptions?)
Initializes a new instance of the SnapshotStorage class.
public SnapshotStorage(SnapshotOptions? options = null)
Parameters
optionsSnapshotOptionsThe snapshot options.
Methods
Delete(string, Version)
Deletes a snapshot.
public bool Delete(string name, Version version)
Parameters
Returns
- bool
True if the snapshot was deleted.
Exists(string, Version)
Checks if a snapshot exists.
public bool Exists(string name, Version version)
Parameters
Returns
- bool
True if the snapshot exists.
GetLatest(string)
Gets the latest snapshot for a domain.
public DomainSnapshot? GetLatest(string name)
Parameters
namestringThe domain name.
Returns
- DomainSnapshot
The latest snapshot, or null if none exist.
ListVersions(string)
Lists all snapshots for a domain.
public IReadOnlyList<Version> ListVersions(string name)
Parameters
namestringThe domain name.
Returns
- IReadOnlyList<Version>
The list of snapshot versions.
Load(string)
Loads a snapshot from a file.
public DomainSnapshot Load(string filePath)
Parameters
filePathstringThe file path.
Returns
- DomainSnapshot
The loaded snapshot.
Load(string, Version)
Loads a snapshot by domain name and version.
public DomainSnapshot Load(string name, Version version)
Parameters
Returns
- DomainSnapshot
The loaded snapshot.
Save(DomainManifest)
Saves a manifest as a snapshot.
public DomainSnapshot Save(DomainManifest manifest)
Parameters
manifestDomainManifestThe manifest to save.
Returns
- DomainSnapshot
The created snapshot.
SaveSnapshot(DomainSnapshot)
Saves a snapshot to disk.
public string SaveSnapshot(DomainSnapshot snapshot)
Parameters
snapshotDomainSnapshotThe snapshot to save.
Returns
- string
The file path where the snapshot was saved.