Table of Contents

Class ConvertedValue<T, U, S>

Namespace
The.Values
Assembly
Instagile.dll
public class ConvertedValue<T, U, S> : IValue<U>, IHasChanges, INotifyValueChanged where S : Traits, new()

Type Parameters

T
U
S
Inheritance
ConvertedValue<T, U, S>
Implements
Derived
Inherited Members
Extension Methods

Constructors

ConvertedValue(IValue<T>)

public ConvertedValue(IValue<T> remoteValue)

Parameters

remoteValue IValue<T>

ConvertedValue(IValue<T>, Func<T, U>, Func<U, T>)

protected ConvertedValue(IValue<T> remoteValue, Func<T, U> from, Func<U, T> to)

Parameters

remoteValue IValue<T>
from Func<T, U>
to Func<U, 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; }

Property Value

bool

Value

read/write underlying data

public U Value { get; set; }

Property Value

U

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