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
originalCollectionChange
CollectionChange(CollectionChangeKind, object)
Represents one item-level change an observable collection query already knows it made.
public CollectionChange(CollectionChangeKind Kind, object Id)
Parameters
KindCollectionChangeKindWhat happened to the item.
IdobjectThe 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
Id
The identity of the item it happened to.
public object Id { get; init; }
Property Value
Kind
What happened to the item.
public CollectionChangeKind Kind { get; init; }
Property Value
Methods
Deconstruct(out CollectionChangeKind, out object)
public void Deconstruct(out CollectionChangeKind Kind, out object Id)
Parameters
KindCollectionChangeKindIdobject
Equals(CollectionChange?)
public virtual bool Equals(CollectionChange? other)
Parameters
otherCollectionChange
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(CollectionChange?, CollectionChange?)
public static bool operator ==(CollectionChange? left, CollectionChange? right)
Parameters
leftCollectionChangerightCollectionChange
Returns
operator !=(CollectionChange?, CollectionChange?)
public static bool operator !=(CollectionChange? left, CollectionChange? right)
Parameters
leftCollectionChangerightCollectionChange