Skip to content
ConsoleMonster
Class

PropertyChange

ConsoleMonster.Changes

Namespace
ConsoleMonster.Changes
Assembly
ConsoleMonster
Modifiers
sealed

One changed property of an object (a nested path such as Address.City for nested objects).

Inheritance

  • object
  • PropertyChange

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 3

Accepted by parameters 1

Constructors

PropertyChange 2 overloads
public PropertyChange(string path, object? before, object? after) #

Creates a property change.

Parameters

path string required
The property path.
before object? required
The old value.
after object? required
The new value.
public PropertyChange(string path, object? before, object? after, bool hasBefore = true, bool hasAfter = true, bool isCaseOnly = false) #

Creates a property comparison with explicit presence and case-only information.

Parameters

path string required
The property path.
before object? required
The original old value.
after object? required
The original new value.
hasBefore bool = true optional
Whether the old property exists, even when its value is null.
hasAfter bool = true optional
Whether the new property exists.
isCaseOnly bool = false optional
Whether case-insensitive comparison found only a case difference.

Methods

public override string ToString() #

Returns a string that represents the current object.

Returns

string A string that represents the current object.

Properties

public string Path { get; } #

The property path.

public object? Before { get; } #

The old value.

public object? After { get; } #

The new value.

public bool HasBefore { get; } #

Whether the old property exists; null is a present value.

public bool HasAfter { get; } #

Whether the new property exists; null is a present value.

public bool IsCaseOnly { get; } #

A visible case-only difference ignored for changed counts.

public string BeforeText { get; } #

The old value as display text; dates that differ only below a minute show their seconds.

public string AfterText { get; } #

The new value as display text; dates that differ only below a minute show their seconds.