SnapshotSettings Class

public sealed class SnapshotSettings : IEquatable<SnapshotSettings>

No documentation is available.

Implements

Constructors

NameDescription
SnapshotSettings()

SnapshotSettings()

SnapshotSettings.cs
public SnapshotSettings()

No documentation is available.

Properties

NameDescription
AutoDetectContinuousEnvironmentGets or sets a value indicating whether to automatically detect continuous integration, continuous testing, and LLM environments and disable snapshot updates.
Comparers
Default
ForceUpdateSnapshots
MaxSnapshotFileNameLength
MergeToolsGets or sets the ordered list of tools used by SnapshotUpdateStrategy.MergeTool and SnapshotUpdateStrategy.MergeToolSync. The first tool that can be started is used. The default list tries the DiffEngine_Tool environment variable, the git merge and diff tools, the current IDE (Visual Studio, Visual Studio Code, Rider), and then the GUI tools detected by DiffEngine. Terminal tools such as Vim are only used when named explicitly. If null or empty, no merge tool is launched and the assertion failure is reported.
Scrubbers
Serializers
SnapshotNamingStrategy
SnapshotPathStrategy
SnapshotUpdateStrategy

AutoDetectContinuousEnvironment

SnapshotSettings.cs

Gets or sets a value indicating whether to automatically detect continuous integration, continuous testing, and LLM environments and disable snapshot updates.

public bool AutoDetectContinuousEnvironment { get; set; }

Property value

bool

Remarks

The default value is true, unless the SNAPSHOTTESTING_AUTODETECT_CONTINUOUS_ENVIRONMENT environment variable is set to false, 0, no or off.

public SnapshotComparerCollection Comparers { get; }

No documentation is available.

public static SnapshotSettings Default { get; set; }

Property value

SnapshotSettings

No documentation is available.

ForceUpdateSnapshots

SnapshotSettings.cs
public bool ForceUpdateSnapshots { get; set; }

Property value

bool

No documentation is available.

MaxSnapshotFileNameLength

SnapshotSettings.cs
public int MaxSnapshotFileNameLength { get; set; }

Property value

int

No documentation is available.

Gets or sets the ordered list of tools used by SnapshotUpdateStrategy.MergeTool and SnapshotUpdateStrategy.MergeToolSync. The first tool that can be started is used. The default list tries the DiffEngine_Tool environment variable, the git merge and diff tools, the current IDE (Visual Studio, Visual Studio Code, Rider), and then the GUI tools detected by DiffEngine. Terminal tools such as Vim are only used when named explicitly. If null or empty, no merge tool is launched and the assertion failure is reported.

public IEnumerable<MergeTool>? MergeTools { get; set; }

Property value

IEnumerable<MergeTool>?

Remarks

The DiffEngine_Disabled environment variable disables all merge tools, even the ones set explicitly. Merge tools are also never launched on a continuous integration server, in a continuous testing runner, or in an LLM agent.

public IList<Scrubber> Scrubbers { get; }

Property value

IList<Scrubber>

No documentation is available.

public SnapshotSerializerCollection Serializers { get; }

No documentation is available.

SnapshotNamingStrategy

SnapshotSettings.cs
public SnapshotNamingStrategy SnapshotNamingStrategy { get; set; }

No documentation is available.

SnapshotPathStrategy

SnapshotSettings.cs
public SnapshotPathStrategy SnapshotPathStrategy { get; set; }

Property value

SnapshotPathStrategy

No documentation is available.

SnapshotUpdateStrategy

SnapshotSettings.cs
public SnapshotUpdateStrategy SnapshotUpdateStrategy { get; set; }

No documentation is available.

Methods

NameDescription
Equals(SnapshotSettings?)
Equals(object?)
GetHashCode()
ToString()

Equals overloads

Equals(SnapshotSettings?)

public bool Equals(SnapshotSettings? other)
Parameters
other SnapshotSettings?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(SnapshotSettings?, SnapshotSettings?)
operator !=(SnapshotSettings?, SnapshotSettings?)

operator ==(SnapshotSettings?, SnapshotSettings?)

public static bool operator ==(SnapshotSettings? left, SnapshotSettings? right)

Parameters

left SnapshotSettings?
right SnapshotSettings?

Returns

bool

No documentation is available.

operator !=(SnapshotSettings?, SnapshotSettings?)

public static bool operator !=(SnapshotSettings? left, SnapshotSettings? right)

Parameters

left SnapshotSettings?
right SnapshotSettings?

Returns

bool

No documentation is available.