Table of Contents

Class Box<T>

Namespace
The.Values
Assembly
Instagile.dll
public sealed class Box<T> : IOwnedValue<T>, IValue<T>, INotifyValueChanged, IProperty, IOwned, IHasChanges

Type Parameters

T
Inheritance
Box<T>
Implements
Inherited Members
Extension Methods

Constructors

Box(T)

public Box(T initialValue)

Parameters

initialValue T

Properties

HasValue

Indicates whether the underlying value of type T has a value

public bool HasValue { get; }

Property Value

bool

IsDefaulted

true if the data is a system default rather than user-entered

public bool IsDefaulted { get; set; }

Property Value

bool

Metadata

Owner's property descriptor (if any owner).

public PropertyInfo? Metadata { get; }

Property Value

PropertyInfo

Parent

Owner (if any).

public EntityKernel? Parent { get; }

Property Value

EntityKernel

Value

read/write underlying data

public T Value { get; set; }

Property Value

T

Methods

GetText()

A textual representation of the underlying value, rather than the IValue itself.

public string GetText()

Returns

string

HasChanges()

true if the current value differs from its original

public bool HasChanges()

Returns

bool

MarkUnchanged()

update original data so that it's no longer considered changed

public void MarkUnchanged()

NeedsSave()

true if the value has non-derived changes, ones made deliberately by a user or business logic

public bool NeedsSave()

Returns

bool

SetDefaulted()

clear any user-entered data and return to system defaults

public void SetDefaulted()

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Events

ValueChanged

public event EventHandler? ValueChanged

Event Type

EventHandler