Skip to content
ConsoleMonster
Class

ObjectChange

ConsoleMonster.Changes

Namespace
ConsoleMonster.Changes
Assembly
ConsoleMonster
Modifiers
sealed

One object of a comparison: added, removed, changed (with its property changes) or unchanged.

Inheritance

  • object
  • ObjectChange

Usage

Explore 2 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 1

Accepted by parameters 1

Constructors

public ObjectChange(ChangeKind kind, string key, object? before, object? after, IReadOnlyList<PropertyChange>? properties = null) #

Creates an object change.

Parameters

kind ConsoleMonster.Changes.ChangeKind required
The kind.
key string required
The key the objects were matched by.
before object? required
The old object, or null when added.
after object? required
The new object, or null when removed.
properties System.Collections.Generic.IReadOnlyList<ConsoleMonster.Changes.PropertyChange>? = null optional
The changed properties.

Properties

public ChangeKind Kind { get; } #

The kind.

public string Key { get; } #

The key the objects were matched by.

public object? Before { get; } #

The old object, or null when added.

public object? After { get; } #

The new object, or null when removed.

public IReadOnlyList<PropertyChange> Properties { get; } #

The changed properties, including case-only differences on unchanged objects.

public string? Summary { get; internal set; } #

A short description of an added or removed object (its first compared properties, such as Title: Admin; Enabled: True), or the value itself for simple values; null when not described.

public IReadOnlyList<PropertyChange> Values { get; internal set; } #

The compared simple properties of an added or removed object (not its key, not empty), each with the value on its side: PropertyChange.After for added objects, PropertyChange.Before for removed ones. Empty for other kinds and for simple values.