SnapshotComparer Class
Provides methods for comparing and normalizing snapshot values.
public abstract class SnapshotComparerConstructors
| Name | Description |
|---|---|
| SnapshotComparer() |
SnapshotComparer()
protected SnapshotComparer()No documentation is available.
Properties
| Name | Description |
|---|---|
| Default | Gets the default snapshot comparer that normalizes whitespace and compares line by line. |
| Ordinal | Gets a snapshot comparer that compares the values exactly, using an ordinal comparison, without normalizing line endings, tabs or whitespace-only lines. |
Default
SnapshotComparer.csGets the default snapshot comparer that normalizes whitespace and compares line by line.
public static SnapshotComparer Default { get; }Property value
Ordinal
SnapshotComparer.csGets a snapshot comparer that compares the values exactly, using an ordinal comparison, without normalizing line endings, tabs or whitespace-only lines.
public static SnapshotComparer Ordinal { get; }Property value
Methods
| Name | Description |
|---|---|
| AreEqual(string?, string?) | Determines whether two snapshot values are equal. |
| NormalizeValue(string?) | Normalizes a snapshot value before comparison. The default implementation returns the value unchanged. |