Back to product page

StateChangedEvent event


Fires when wodSSH.NET changes its state.

Syntax

  • C#
  • VB.NET
delegate void StateChangedDelegate(object Sender, StateChangedArgs Args);
The StateChangedEvent(Args.NewState,Args.OldState) syntax has these parts:
Args.NewStateStates enumeration. Holds current state.
Args.OldStateStates enumeration. Holds previous state.

Delegate Sub StateChangedDelegate(ByVal Sender As Object, ByVal Args As StateChangedArgs)
The StateChangedEvent(Args.NewState,Args.OldState) syntax has these parts:
Args.NewStateStates enumeration. Holds current state.
Args.OldStateStates enumeration. Holds previous state.

Remarks

StateChange event is fired each time wodSSH.NET internal state changes. Initially, it is set to Disconnected. Once you initiate new connection, it will change to Connecting, etc..

Using this event you can see if there is something happening with wodSSH.NET, or it is idle and waiting for your commands. To obtain information about old and current state, consult Args.OldState and Args.NewState properties.

You can determine current state using State property.

Platforms

Windows