Class CollectionChange

Namespace
Cratis.Arc.Queries
Assembly
Cratis.Arc.Core.dll

Represents one item-level change an observable collection query already knows it made.

public record CollectionChange : IEquatable<CollectionChange>
Inheritance
CollectionChange
Implements
Inherited Members
Extension Methods

Remarks

A provider that watches a data source is told exactly which item changed. Carrying that identity alongside the emission is what lets the delta for the emission be stated rather than rediscovered by comparing the whole new snapshot against the whole previous one.

Constructors

CollectionChange(CollectionChange)

protected CollectionChange(CollectionChange original)

Parameters

original CollectionChange

CollectionChange(CollectionChangeKind, object)

Represents one item-level change an observable collection query already knows it made.

public CollectionChange(CollectionChangeKind Kind, object Id)

Parameters

Kind CollectionChangeKind

What happened to the item.

Id object

The identity of the item it happened to.

Remarks

A provider that watches a data source is told exactly which item changed. Carrying that identity alongside the emission is what lets the delta for the emission be stated rather than rediscovered by comparing the whole new snapshot against the whole previous one.

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Id

The identity of the item it happened to.

public object Id { get; init; }

Property Value

object

Kind

What happened to the item.

public CollectionChangeKind Kind { get; init; }

Property Value

CollectionChangeKind

Methods

Deconstruct(out CollectionChangeKind, out object)

public void Deconstruct(out CollectionChangeKind Kind, out object Id)

Parameters

Kind CollectionChangeKind
Id object

Equals(CollectionChange?)

public virtual bool Equals(CollectionChange? other)

Parameters

other CollectionChange

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(CollectionChange?, CollectionChange?)

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

Parameters

left CollectionChange
right CollectionChange

Returns

bool

operator !=(CollectionChange?, CollectionChange?)

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

Parameters

left CollectionChange
right CollectionChange

Returns

bool