LuciadCPillar C# 2024.0.02
Luciad.Utils.Observable< T > Class Template Reference

This class makes it possible to hold and observe a value that can change over time. More...

Public Member Functions

 Observable (T initialValue)
 
void AddCallback (IInvalidationCallback callback)
 Adds a callback that is notified when Value is called. More...
 
void RemoveCallback (IInvalidationCallback callback)
 Remove the given callback. More...
 

Static Public Member Functions

static Observable< T > Create (T initialValue)
 Creates a new Observable with the given initial value. More...
 

Properties

Value [get, set]
 

Detailed Description

This class makes it possible to hold and observe a value that can change over time.

Template Parameters
Tthe type to hold
Since
2022.0

Constructor & Destructor Documentation

◆ Observable()

Luciad.Utils.Observable< T >.Observable ( initialValue)
inline

Member Function Documentation

◆ AddCallback()

void Luciad.Utils.Observable< T >.AddCallback ( IInvalidationCallback  callback)
inline

Adds a callback that is notified when Value is called.

Parameters
callbacka callback
Exceptions
System.ArgumentExceptionwhen the call back is already added.

◆ Create()

static Observable< T > Luciad.Utils.Observable< T >.Create ( initialValue)
inlinestatic

Creates a new Observable with the given initial value.

Parameters
initialValuethe initial value.

◆ RemoveCallback()

void Luciad.Utils.Observable< T >.RemoveCallback ( IInvalidationCallback  callback)
inline

Remove the given callback.

Parameters
callbacka callback
Exceptions
System.ArgumentExceptionwhen the call back is not known.

Property Documentation

◆ Value

T Luciad.Utils.Observable< T >.Value
getset