CogApplicationState ClassCognex VisionPro 9.22
Class that provides API to control application state.
Inheritance Hierarchy

System Object
  Cognex.VisionPro CogApplicationState

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 87.0.0.0
Syntax

[SerializableAttribute]
public class CogApplicationState

The CogApplicationState type exposes the following members.

Constructors

  NameDescription
Public methodCogApplicationState
Default constructor. All default values for this class are not read from the global state of the application.
Top
Methods

  NameDescription
Public methodApplyMultiThreadingApplicationState
Make the global MultiThreading state of the current application equivalent to the values in the MultiThreading properties of this class. The following properties will be applied to application: MultiThreadingEnabled, MultiThreadingThreadCount, and MultiThreadingThreadCountMode.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReadMultiThreadingApplicationState
Read from global MultiThreading state of the current application and use it set the values of the MultiThreading properties of this class. The following properties will be set: MultiThreadingEnabled, MultiThreadingThreadCount, MultiThreadingThreadCountMode.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Properties

  NameDescription
Public propertyMultiThreadingEnabled
Get/set if multithreading flag is enabled or not.
Public propertyMultiThreadingThreadCount
Get/set the number of threads.
Public propertyMultiThreadingThreadCountMode
Get/set the thread count mode.
Top
Remarks

There is some global state of the running application such as multithreading settings of the application. This class can hold a snapshot of that state, and re-apply this snapshot to the application. For example the user can use the function ReadMultiThreadingApplicationState function to get the snapshot of the MultiThreading state of the application. Then the user can use the ApplyMultiThreadingApplicationState to re-apply this snapshot to change the MultiThreading state of the application.
See Also