LanguageExt.Core

LanguageExt.Core DataTypes Change

Contents

class Change <A> Source #

Represents changes to a value in a collection type (i.e. a key-value collection)

Parameters

type A

Value type

Properties

property bool HasNoChange Source #

Returns true if nothing has changed

property bool HasChanged Source #

Returns true if anything has changed (add, update, or removal)

property bool HasRemoved Source #

Returns true if a value has been removed

property bool HasMapped Source #

Returns true if a value has been mapped to another

property bool HasAdded Source #

Returns true if a value has been added

property Change<A> None Source #

Returns a NoChange state

Methods

method bool HasMappedFrom <FROM> () Source #

Returns true if a value has been mapped to another

method Option<A> ToOption () Source #

If a value has been updated this will return Some(Value), else none

method Change<A> Removed (A oldValue) Source #

Returns a EntryRemoved state

method Change<A> Added (A value) Source #

Returns a EntryAdded state

method Change<A> Mapped <FROM> (FROM oldValue, A value) Source #

Returns a EntryMapped state

method bool Equals (object? obj) Source #

Equality

method bool Equals (Change<A>? obj) Source #

Equality

method int GetHashCode () Source #

Hash code

method Change<A> Combine (Change<A> y) Source #

class EntryAdded <A> Source #

Entry added to a collection

Parameters

type A

Value type

Fields

field A Value Source #

Value that has been added

Methods

method bool Equals (Change<A>? obj) Source #

method bool Equals (EntryAdded<A>? rhs) Source #

method int GetHashCode () Source #

method void Deconstruct (out A value) Source #

method string ToString () Source #

interface EntryMappedTo <B> Source #

Existing entry updated to this value

Parameters

type B

Value mapped to type

Properties

property B To Source #

Value mapped-to

interface EntryMappedFrom <A> Source #

Existing entry updated from this value

Parameters

type A

Value mapped from type

Properties

property A From Source #

Value mapped-from

class EntryMapped <A, B> Source #

Existing entry updated

Properties

property A From Source #

Value mapped from

property B To Source #

Value mapped to

Methods

method bool Equals (Change<B>? obj) Source #

method bool Equals (EntryMapped<A, B>? rhs) Source #

method int GetHashCode () Source #

method string ToString () Source #

method void Deconstruct (out B to) Source #

method void Deconstruct (out A @from) Source #

method void Deconstruct (out A @from, out B to) Source #

class EntryRemoved <A> Source #

Existing entry removed

Parameters

type A

Value type

Fields

field A OldValue Source #

Value that was removed

Methods

method bool Equals (Change<A>? obj) Source #

method int GetHashCode () Source #

method bool Equals (EntryRemoved<A>? rhs) Source #

method void Deconstruct (out A oldValue) Source #

method string ToString () Source #

class NoChange <A> Source #

No change to the collection

Parameters

type A

Value type

Fields

field Change<A> Default = new NoChange<A>() Source #

Singleton value of NoChange

Methods

method bool Equals (Change<A>? obj) Source #

method bool Equals (NoChange<A>? rhs) Source #

method int GetHashCode () Source #

method string ToString () Source #