![]() |
C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Monitors the status of analyses as they run. More...
Public Member Functions | |
| SimulationStatusMonitor () | |
| Initialize a new SimulationStatusMonitor with an empty list of monitored simulations. | |
| void | AbortAll () |
| Cancels all active polling threads. | |
| void | MonitorSimulationRequest (IAPIResourceView view, Action simulationRequest) |
| Initiates a request for the specified view's simulation results and monitors it until completion. | |
| void | Reset () |
| Cancels all active polling and clears the list of known simulations. | |
| delegate void | SimulationStatusAddedDelegate (SimulationStatusMonitor sender, SimulationStatus added) |
| A handler that can respond to a SimulationStatusAdded event. | |
| delegate void | SimulationStatusChangedDelegate (SimulationStatusMonitor sender, SimulationStatus changed) |
| A handler that can respond to a SimulationStatusChanged event. | |
Public Attributes | |
| double | MaxPollInterval = 5.0 |
| Maximum time before polling the view to get a new time remaining. | |
| int | MaxTimeouts = 3 |
| Maximum number of consecutive timeouts before we stop polling the server and return the timeout error. | |
| SimulationStatusAddedDelegate | SimulationStatusAdded |
| An event that fires whenever a new SimulationStatus is added to this monitor. | |
| SimulationStatusChangedDelegate | SimulationStatusChanged |
| An event that fires whenever a SimulationStatus being monitored undergoes a change. | |
Properties | |
| List< SimulationStatus > | MonitoredSimulations [get] |
| Copy of current simulations, so something just hooking into the monitor can get a history. | |
| int | NumActivePolls [get] |
| Tracks the number of currently running threads. | |
Monitors the status of analyses as they run.
Definition at line 16 of file SimulationStatusMonitor.cs.
|
inline |
Initialize a new SimulationStatusMonitor with an empty list of monitored simulations.
Definition at line 55 of file SimulationStatusMonitor.cs.
|
inline |
Cancels all active polling threads.
Definition at line 63 of file SimulationStatusMonitor.cs.
|
inline |
Initiates a request for the specified view's simulation results and monitors it until completion.
| view | The view on which the simulation request is executing. |
| simulationRequest | The simulation request to execute. |
Definition at line 87 of file SimulationStatusMonitor.cs.
|
inline |
Cancels all active polling and clears the list of known simulations.
Definition at line 74 of file SimulationStatusMonitor.cs.
| delegate void AnalyzeRe.Utilities.SimulationStatusMonitor.SimulationStatusAddedDelegate | ( | SimulationStatusMonitor | sender, |
| SimulationStatus | added | ||
| ) |
A handler that can respond to a SimulationStatusAdded event.
| sender | The SimulationStatusMonitor that invoked the SimulationStatusAdded event. |
| added | The SimulationStatus that was added. |
| delegate void AnalyzeRe.Utilities.SimulationStatusMonitor.SimulationStatusChangedDelegate | ( | SimulationStatusMonitor | sender, |
| SimulationStatus | changed | ||
| ) |
A handler that can respond to a SimulationStatusChanged event.
| sender | The SimulationStatusMonitor that invoked the SimulationStatusChanged event. |
| changed | The SimulationStatus that was changed. |
| double AnalyzeRe.Utilities.SimulationStatusMonitor.MaxPollInterval = 5.0 |
Maximum time before polling the view to get a new time remaining.
Definition at line 27 of file SimulationStatusMonitor.cs.
| int AnalyzeRe.Utilities.SimulationStatusMonitor.MaxTimeouts = 3 |
Maximum number of consecutive timeouts before we stop polling the server and return the timeout error.
Definition at line 29 of file SimulationStatusMonitor.cs.
| SimulationStatusAddedDelegate AnalyzeRe.Utilities.SimulationStatusMonitor.SimulationStatusAdded |
An event that fires whenever a new SimulationStatus is added to this monitor.
Definition at line 43 of file SimulationStatusMonitor.cs.
| SimulationStatusChangedDelegate AnalyzeRe.Utilities.SimulationStatusMonitor.SimulationStatusChanged |
An event that fires whenever a SimulationStatus being monitored undergoes a change.
Definition at line 50 of file SimulationStatusMonitor.cs.
|
get |
Copy of current simulations, so something just hooking into the monitor can get a history.
Definition at line 34 of file SimulationStatusMonitor.cs.
|
get |
Tracks the number of currently running threads.
Definition at line 31 of file SimulationStatusMonitor.cs.