'Declaration Public Event StateChange As StateChangeEventHandler
'Usage Dim instance As TdConnection Dim handler As StateChangeEventHandler AddHandler instance.StateChange, handler
public event StateChangeEventHandler StateChange
public: event StateChangeEventHandler^ StateChange
Event Data
The event handler receives an argument of type StateChangeEventArgs containing data related to this event. The following StateChangeEventArgs properties provide information specific to this event.
Property | Description |
---|---|
CurrentState | Gets the new state of the connection. The connection object will be in the new state already when the event is fired. |
OriginalState | Gets the original state of the connection. |
Remarks
The StateChange event is raised immediately during the following transitions:
- When a connection is opened the state transitions from Closed to Open.
- When a connection transitions from Open to Closed during connection closure.
Requirements
Product | Versions | Platforms |
---|---|---|
.NET | 2.1, 3.1, 6 | Windows, Linux, MacOS |
.NET Framework | 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 | Windows |
.NET Standard | 2.0 | Windows, Linux, MacOS |
See Also