Show / Hide Table of Contents

Class ObservableValue<T>

Observable value. Can be changed and can be observed.

Inheritance
System.Object
Atom
ObservableValue<T>
Implements
IAtom
IObservable
IDependencyNode
IObservableValue<T>
IValue<T>
IValue
Inherited Members
Atom.BecomeObserved
Atom.BecomeUnobserved
Atom.Observers
Atom.IsPendingUnobservation
Atom.LastAccessedBy
Atom.IsBeingObserved
Atom.LowestObserverState
Atom.Name
Atom.SharedState
Atom.OnBecomeObserved()
Atom.OnBecomeUnobserved()
Atom.ReportChanged()
Atom.ReportObserved()
Atom.ToString()
Namespace: Cortex.Net.Types
Assembly: Cortex.Net.dll
Syntax
public class ObservableValue<T> : Atom, IAtom, IObservable, IDependencyNode, IObservableValue<T>, IValue<T>, IValue
Type Parameters
Name Description
T

The type of the Observable value.

Constructors

| Improve this Doc View Source

ObservableValue(ISharedState, String, IEnhancer, T)

Initializes a new instance of the ObservableValue<T> class.

Declaration
public ObservableValue(ISharedState sharedState, string name, IEnhancer enhancer, T value = null)
Parameters
Type Name Description
ISharedState sharedState

The shared state this Observable will be attached to.

System.String name

The name of this observable value.

IEnhancer enhancer

The enhancer to use on the type.

T value

The initial value of the Observable.

Properties

| Improve this Doc View Source

Value

Gets or sets the underlying value.

Declaration
public T Value { get; set; }
Property Value
Type Description
T

Methods

| Improve this Doc View Source

Observe(EventHandler<ValueChangedEventArgs<T>>, Boolean)

Registers the secified event handler, and optionally fires it first.

Declaration
public void Observe(EventHandler<ValueChangedEventArgs<T>> changedEventHandler, bool fireImmediately)
Parameters
Type Name Description
EventHandler<ValueChangedEventArgs<T>> changedEventHandler

The event handler to register.

System.Boolean fireImmediately

Whether to fire the event handler immediately.

Events

| Improve this Doc View Source

Change

Event that fires before the value will change.

Declaration
public event EventHandler<ValueChangeEventArgs<T>> Change
Event Type
Type Description
EventHandler<ValueChangeEventArgs<T>>
| Improve this Doc View Source

Changed

Event that fires after the value has changed.

Declaration
public event EventHandler<ValueChangedEventArgs<T>> Changed
Event Type
Type Description
EventHandler<ValueChangedEventArgs<T>>

Explicit Interface Implementations

| Improve this Doc View Source

IValue.Value

Gets or sets the underlying value.

Declaration
object IValue.Value { get; set; }
Returns
Type Description
System.Object

Implements

IAtom
IObservable
IDependencyNode
IObservableValue<T>
IValue<T>
IValue

Extension Methods

TraceExtensions.Trace<TObject, TMember>(TObject, Expression<Func<TObject, TMember>>, TraceMode)
ReactiveObjectTypeUtilExtensions.GetObservable(Object)
ReactiveObjectTypeUtilExtensions.GetObservable<TObject, TMember>(TObject, Expression<Func<TObject, TMember>>)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX