Table of Contents

Class ObservableProperty

Namespace
CarinaStudio.ViewModels
Assembly
CarinaStudio.AppBase.Application.dll

Represent an observable property.

public abstract class ObservableProperty
Inheritance
ObservableProperty
Derived
Inherited Members
Extension Methods

Fields

Comparer

public static readonly IComparer<ObservableProperty> Comparer

Field Value

IComparer<ObservableProperty>

Properties

Id

Unique ID of property.

public int Id { get; }

Property Value

int

Name

Name of property.

public string Name { get; }

Property Value

string

OwnerType

Type of property owner.

public Type OwnerType { get; }

Property Value

Type

ValueType

Type of value.

public Type ValueType { get; }

Property Value

Type

Methods

GetHashCode()

Get hash-code.

public override int GetHashCode()

Returns

int

Hash-code.

Register<TOwner, TValue>(string, TValue, Func<TOwner, TValue, TValue>?, Predicate<TValue>?)

Register a typed property.

public static ObservableProperty<TValue> Register<TOwner, TValue>(string name, TValue defaultValue = default, Func<TOwner, TValue, TValue>? coerce = null, Predicate<TValue>? validate = null)

Parameters

name string

Name of property.

defaultValue TValue

Default value.

coerce Func<TOwner, TValue, TValue>

Coercion function.

validate Predicate<TValue>

Validation function.

Returns

ObservableProperty<TValue>

Type Parameters

TOwner

Type of owner.

TValue

Type of value.