Hide menu
Loading...
Searching...
No Matches
cadex.ProgressStatus.Observer Class Referenceabstract

Base abstract class for observers registered in ProgressStatus. More...

Inherits global.SystemIDisposable.

Public Member Functions

 Observer (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 
 Observer ()
 
void ChangedValue (cadex.ProgressStatus theStatus)
 
void Completed (cadex.ProgressStatus theStatus)
 
virtual void Canceled (cadex.ProgressStatus theStatus)
 A callback called when the progress status object was set to the canceled state.
 
void SetNotifyingThread ()
 
void SetNotifyingThread (cadex.ProgressStatus.Observer theOther)
 
void SetAllNotifyingThreads ()
 
bool CanBeNotifiedFromThisThread ()
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Detailed Description

Base abstract class for observers registered in ProgressStatus.

Subclasses must redefined virtual functions ChangedValue() and Completed(). User-defined observers must be registered in the progress status object with the help of ProgressStatus.Register().

By default the observer will only be notified in the same thread it was created. This is to minimize a risk of data race in multi-threaded applications if the user-defined observer is not thread-safe. To enable notifications from other threads use SetAllNotifyingThreads() to allow notifications from any thread or different syntaxes of SetNotifyingThread() to enable notifications from single thread.

Constructor & Destructor Documentation

◆ Observer()

cadex.ProgressStatus.Observer.Observer ( )
inline

Default constructor.