Table of Contents

Class SnapshotOptions

Namespace
JD.Domain.Snapshot
Assembly
JD.Domain.Snapshot.dll

Configuration options for snapshot operations.

public sealed class SnapshotOptions
Inheritance
SnapshotOptions
Inherited Members

Properties

FileNamePattern

Gets or sets the file naming pattern. Supports {name} and {version} placeholders. Default is "v{version}.json".

public string FileNamePattern { get; set; }

Property Value

string

IncludeSchema

Gets or sets whether to include the schema reference in the JSON. Default is true.

public bool IncludeSchema { get; set; }

Property Value

bool

IndentedJson

Gets or sets whether to use indented JSON formatting. Default is true for readability.

public bool IndentedJson { get; set; }

Property Value

bool

OrganizeByDomainName

Gets or sets whether to organize snapshots in subdirectories by domain name. Default is true.

public bool OrganizeByDomainName { get; set; }

Property Value

bool

OutputDirectory

Gets or sets the base directory for storing snapshots. Default is "DomainSnapshots" in the current directory.

public string OutputDirectory { get; set; }

Property Value

string

Methods

FormatFileName(string, Version)

Formats the file name for a snapshot.

public string FormatFileName(string name, Version version)

Parameters

name string

The domain name.

version Version

The domain version.

Returns

string

The formatted file name.

GetFilePath(string, Version)

Gets the full path for a snapshot file.

public string GetFilePath(string name, Version version)

Parameters

name string

The domain name.

version Version

The domain version.

Returns

string

The full file path.