using System; namespace ZB.MOM.WW.LmxProxy.Client.Domain; /// /// Represents the connection state of an LmxProxy client. /// public enum ConnectionState { /// Not connected to the server. Disconnected, /// Connection attempt in progress. Connecting, /// Connected and ready for operations. Connected, /// Graceful disconnect in progress. Disconnecting, /// Connection failed with an error. Error, /// Attempting to re-establish a lost connection. Reconnecting } /// /// Event arguments for connection state change notifications. /// public class ConnectionStateChangedEventArgs : EventArgs { /// The previous connection state. public ConnectionState OldState { get; } /// The new connection state. public ConnectionState NewState { get; } /// Optional message describing the state change (e.g., error details). public string? Message { get; } public ConnectionStateChangedEventArgs(ConnectionState oldState, ConnectionState newState, string? message = null) { OldState = oldState; NewState = newState; Message = message; } }