Click or drag to resize

cCoreStateMonitor Class

Monitor that distributes Core execution state change events and Core data state change events.
Inheritance Hierarchy
SystemObject
  EwECorecCoreStateMonitor

Namespace:  EwECore
Assembly:  EwECore (in EwECore.dll) Version: 6.6.15981.0 (6.6.15981.0)
Syntax
public class cCoreStateMonitor

The cCoreStateMonitor type exposes the following members.

Constructors
  NameDescription
Public methodcCoreStateMonitor
Constructor, initializes a new instance of this class.
Top
Properties
  NameDescription
Public propertySyncObject
Top
Methods
  NameDescription
Public methodCanEcopathLoad
Public methodCanEcosimLoad
Public methodCanEcospaceLoad
Public methodCanEcotracerLoad
Public methodCoreExecutionState
Returns the current EwE Core Execution state.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasEcopathInitialized
Returns whether an Ecopath model has been initialized.
Public methodHasEcopathLoaded
Returns whether an Ecopath model has been loaded.
Public methodHasEcopathRan
Returns whether an Ecopath model has completed succesfully.
Public methodHasEcosimInitialized
Returns whether an Ecosim scenario has been initialized.
Public methodHasEcosimLoaded
Returns whether an Ecosim scenario has been loaded.
Public methodHasEcosimRan
Returns whether an Ecosim scenario has completed its timesteps succesfully.
Public methodHasEcospaceInitialized
Returns whether an Ecospace scenario has been initialized.
Public methodHasEcospaceLoaded
Returns whether an Ecospace scenario has been loaded.
Public methodHasEcospaceRan
Returns whether an Ecospace scenario has completed its timesteps succesfully.
Public methodHasEcotracerLoaded
Returns whether an Ecotracer scenario has been loaded.
Public methodHasEcotracerRanForEcosim
Returns whether Ecotracer results have been computed for the last Ecosim run .
Public methodHasEcotracerRanForEcospace
Returns whether Ecotracer results have been computed for the last Ecospace run .
Public methodHasPSDRan
Returns whether the Ecopath PSD model has completed succesfully.
Public methodIsBatchLocked
Returns whether a batch lock is active on the core.
Public methodIsBusy
Returns whether the core is busy. Either a model is running, a search is in progress, or a batch operation is in progress.
Public methodIsDatasourceModified
Returns whether the Datasource contains changes that have not been saved, which will not influence the running model and its scenarios.
Public methodIsEcopathModified
Returns whether the Ecopath model data contains changes that have not been saved.
Public methodIsEcopathRunning
Returns whether an Ecopath model is running.
Public methodIsEcosimModified
Returns whether the Ecosim scenario data contains changes that have not been saved.
Public methodIsEcosimRunning
Returns whether an Ecosim scenario is running.
Public methodIsEcospaceModified
Returns whether the Ecospace scenario data contains changes that have not been saved.
Public methodIsEcospaceRunning
Returns whether an Ecospace scenario is running.
Public methodIsEcotracerModified
Returns whether the Ecotracer scenario data contains changes that have not been saved.
Public methodIsExecutionStateSuperceded
Returns whether the current core execution state equals or exceeds a given state.
Public methodIsModified
Returns whether there are ANY unsaved changes.
Public methodIsPaused
Public methodIsPluginModified
Returns whether the plug-ins contains data changes that have not been saved.
Public methodIsSearching
Returns whether the core is searching. To find what search is running refer to SearchMode.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSearchMode
Returns the current eSearchModes.
Public methodSetIsPaused
This only fires off a core execution state event to allow depending elements to check the IsPaused state.
Public methodSetIsSearching
Set the searching state of the core state monitor.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventCoreDataStateEvent
The core data state change event.
Public eventCoreExecutionStateEvent
The core execution state change event.
Top
Extension Methods
  NameDescription
Public Extension MethodValue
Extension method; extract a value from an object by property name.
(Defined by Extensions.)
Top
Remarks

The following class tracks core execution state changes:

Class StateTracker

    Public Sub New(ByRef sm as cCoreStateMonitor)
        ' Hook up to core state monitor
       AddHandler sm.CoreExecutionStateEvent, AddressOf OnCoreExecutionStateChange
    End Sub

    Private Sub OnCoreExecutionStateChange(ByVal core As cCore, ByVal iState As eCoreExecutionState)
       ' Handle core state changes
       Console.WriteLine("State tracker: core {0} state has changed to {1}", core, iState)
    End Sub

End Class
See Also