This class watches a property or sub-property of an object, and raises a Changed
event when the value of the property has changed.
Inheritance Hierarchy
System MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro.Implementation CogSerializableObjectBase
Cognex.VisionPro.Implementation CogSerializableChangedEventBase
Cognex.VisionPro CogPropertyWatcher
Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro (in Cognex.VisionPro.dll) Version: 75.0.0.0 (75.0.0.0)
Syntax
The CogPropertyWatcher type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogPropertyWatcher |
Constructs a new instance of the CogPropertyWatcher class.
| |
| CogPropertyWatcher(CogPropertyWatcher) |
Constructs a new instance of the CogPropertyWatcher class with the same
subject and path as the other instance.
| |
| CogPropertyWatcher(Object, String) |
Constructs a new instance of the CogPropertyWatcher class with the given subject and path.
| |
| CogPropertyWatcher(SerializationInfo, StreamingContext) |
Initializes a new instance of the CogPropertyWatcher class with
serialized data.
| |
| CogPropertyWatcher(Object, String, Boolean) |
Constructs a new instance of the CogPropertyWatcher class with the given subject and path.
|
Methods
| Name | Description | |
|---|---|---|
| Attach |
Attaches to a new subject and path.
| |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Dispose | ||
| Equals | (Inherited from Object.) | |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetObjectData |
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.) | |
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetSourceOfNonCastAncestor | ||
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| OnChanged(Int64) |
This method should be called internally whenever the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| OnChanged(CogChangedEventArgs) | (Overrides CogSerializableChangedEventBase OnChanged(CogChangedEventArgs).) | |
| OnDeserialization | ||
| OnDisposed |
Raises the Disposed event.
| |
| OnPropertyValueRejected | ||
| OnPropertyValueSetButNoChangedEventFired | ||
| PropertyValueUpdate( Object ) | ||
| PropertyValueUpdate(Object, Type, ICogControlValueConverter, ICogPropertyValueConverter, Type, Boolean) | ||
| ResumeAndRaiseChangedEvent |
Re-enables raising of the Changed event after SuspendChangedEvent
has been called, and raises the Changed event if the
ChangedEventSuspended count is reduced to zero and any changes were
made while events were suspended. Must be called once for each call to
SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| SuspendChangedEvent |
Temporarily suspends the raising of the Changed event. May be called
more than once, and a corresponding call to ResumeAndRaiseChangedEvent
must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| ToString | (Overrides Object ToString .) |
Fields
| Name | Description | |
|---|---|---|
| SfIsConnected |
State flag for the IsConnected property.
| |
| SfNextSf |
Next state flag to be used in derived classes.
| |
| SfOptimizeIneffectiveChanges |
State flag for the OptimizeIneffectiveChanges property.
| |
| SfPath |
State flag for the Path property.
| |
| SfPropertyDescriptor |
State flag for the PropertyDescriptor property.
| |
| SfSubject |
State flag for the Subject property.
| |
| SfValue |
State flag for the Value property.
|
Properties
| Name | Description | |
|---|---|---|
| ChangedEventSuspended |
If nonzero, indicates that the raising of the Changed event has been
suspended. This value is incremented when SuspendChangedEvent is called
and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.) | |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| IsConnected |
Indicates if this property watcher is currently connected to a valid
property.
| |
| IsDisposed |
Indicates if Dispose has been called on this instance.
| |
| OptimizeIneffectiveChanges |
Determines if this property watcher will optimize out any attempts to
set Value to its current value.
| |
| Path |
Gets or sets the path to the property or sub-property being watched.
| |
| PropertyDescriptor |
Gets the property descriptor of this property.
| |
| StateFlags |
Returns the complete set of state flags supported on this object. The
flags may be indexed by name as shown in the following C# code snippet:
if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.) | |
| Subject |
Gets or sets the object whose property or sub-property is being watched.
| |
| Value |
Gets or sets the value of the property.
|
Events
| Name | Description | |
|---|---|---|
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| Disposed |
This event is raised when the Dispose method is called. It gets called
before any disposing is done so the properties of this object are
still valid at this point.
| |
| PropertyValueRejected | ||
| PropertyValueSetButNoChangedEventFired |
See Also