Show / Hide Table of Contents

Class Atom

Implements an Atom. Atoms can be used to signal Cortex.Net that some observable data source has been observed or changed. And Cortex.Net will signal the atom whenever it is used or no longer in use.

Inheritance
System.Object
Atom
ObservableValue<T>
Implements
IAtom
IObservable
IDependencyNode
Namespace: Cortex.Net.Core
Assembly: Cortex.Net.dll
Syntax
public class Atom : object, IAtom, IObservable, IDependencyNode

Properties

| Improve this Doc View Source

IsBeingObserved

Gets or sets a value indicating whether the observable is being observed. An observable is being observed when at least one derivation actually accesses its value.

Declaration
public bool IsBeingObserved { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsPendingUnobservation

Gets or sets a value indicating whether this atom is pending Unobservation.

Declaration
public bool IsPendingUnobservation { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

LastAccessedBy

Gets or sets the Id of the derivation run that last accessed this observable. If this Id equals the RunId of the current derivation the dependency is already established.

Declaration
public int LastAccessedBy { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

LowestObserverState

Gets or sets the lowest DerivationState on any of it's observers.

Declaration
public DerivationState LowestObserverState { get; set; }
Property Value
Type Description
DerivationState
| Improve this Doc View Source

Name

Gets the Name of the Atom instance.

Declaration
public string Name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Observers

Gets the Observers.

Declaration
public ISet<IDerivation> Observers { get; }
Property Value
Type Description
ISet<IDerivation>
| Improve this Doc View Source

SharedState

Gets the Shared State of all the nodes in the dependency graph.

Declaration
public ISharedState SharedState { get; }
Property Value
Type Description
ISharedState

Methods

| Improve this Doc View Source

OnBecomeObserved()

Method that triggers event BecomeObserved.

Declaration
public void OnBecomeObserved()
| Improve this Doc View Source

OnBecomeUnobserved()

Method that triggers event BecomeUnobserved.

Declaration
public void OnBecomeUnobserved()
| Improve this Doc View Source

ReportChanged()

Invoke this method after this atom has changed to signal Cortex.Net that all its observers should invalidate.

Declaration
public void ReportChanged()
| Improve this Doc View Source

ReportObserved()

Invoke this method to notify Cortex.Net that your atom has been used somehow.

Declaration
public bool ReportObserved()
Returns
Type Description
System.Boolean

Returns true if there is currently a reactive context.

| Improve this Doc View Source

ToString()

Returns the name of this Atom.

Declaration
public override string ToString()
Returns
Type Description
System.String

The name of the Atom.

Events

| Improve this Doc View Source

BecomeObserved

Event that will fire after the Atom has become observed.

Declaration
public event EventHandler BecomeObserved
Event Type
Type Description
EventHandler
| Improve this Doc View Source

BecomeUnobserved

Event that will fire after the observable has become unobserved.

Declaration
public event EventHandler BecomeUnobserved
Event Type
Type Description
EventHandler

Implements

IAtom
IObservable
IDependencyNode

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