Skip to content
ConsoleMonster

API Reference

Class

ChangeSet

Namespace ConsoleMonster.Changes
Assembly ConsoleMonster
Modifiers sealed

The result of a comparison, with counts by kind.

Inheritance

  • Object
  • ChangeSet

Usage

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

Accepted by parameters 4

Constructors

ChangeSet 2 overloads
public ChangeSet(IReadOnlyList<ObjectChange> changes) #

Creates a change set.

Parameters

changes System.Collections.Generic.IReadOnlyList<ConsoleMonster.Changes.ObjectChange> requiredposition: 0
The object changes.
public ChangeSet(IReadOnlyList<ObjectChange> changes, Int32 unchanged) #

Creates a change set that also counts unchanged objects that are not listed.

Parameters

changes System.Collections.Generic.IReadOnlyList<ConsoleMonster.Changes.ObjectChange> requiredposition: 0
The object changes.
unchanged System.Int32 requiredposition: 1
The number of unchanged objects, listed or not.

Properties

public IReadOnlyList<ObjectChange> Changes { get; } #

Every object, in a stable order (changes first by kind, then unchanged ones).

public Int32 Added { get; } #

Objects only in the new set.

public Int32 Removed { get; } #

Objects only in the old set.

public Int32 Changed { get; } #

Objects in both with different values.

public Int32 Unchanged { get; private set; } #

Objects in both with the same values (counted even when not listed).

public Boolean HasChanges { get; } #

Whether anything was added, removed or changed.

public Boolean IsDestructive { get; } #

Whether the change removes objects: the case for a typed confirmation.