Skip to content

Latest commit

 

History

History
41 lines (35 loc) · 4.93 KB

Record.T.TThis..md

File metadata and controls

41 lines (35 loc) · 4.93 KB

Record<T,TThis> Class

Defines a reference type that provides built-in functionality for encapsulating data.

public abstract class Record<T,TThis>
    where TThis : KeepCoding.Record<T, TThis>, new()

Type parameters

T
The type of data to encapsulate.

TThis
The type that is encapsulating T.

Inheritance System.Object 🡒 Record<T,TThis>

Remarks

This class has been mostly taken from mcintyre321's ValueOf type. https://github.com/mcintyre321/ValueOf

Properties
Value The value to store.
Methods
Equals(Record<T,TThis>) Determines whether two records don't contain the same Value.
Equals(object) Determines whether two records don't contain the same Value.
From(T) Creates a new instance of Record<T,TThis> from the specified TThis.
GetHashCode() Gets the hash code.
ToString() Uses Stringify<T>(T, StringifyFormat) for the inner Value.
Validate() Called whenever From(T) is used. This method can be used to throw invalid values.
Operators
operator ==(Record<T,TThis>, Record<T,TThis>) Determines whether two records contain the same Value.
implicit operator Record<T,TThis>(T) Encapsulates a into a new instance of Record<T,TThis>.
implicit operator T(Record<T,TThis>) Takes a's inner Value.
operator !=(Record<T,TThis>, Record<T,TThis>) Determines whether two records don't contain the same Value.