using System; namespace ZB.MOM.WW.LmxProxy.Host.Domain { /// /// Event arguments for SCADA client connection state changes. /// public class ConnectionStateChangedEventArgs : EventArgs { /// /// Initializes a new instance of the class. /// /// The previous connection state. /// The current connection state. /// Optional message providing additional information about the state change. public ConnectionStateChangedEventArgs(ConnectionState previousState, ConnectionState currentState, string? message = null) { PreviousState = previousState; CurrentState = currentState; Timestamp = DateTime.UtcNow; Message = message; } /// /// Gets the previous connection state. /// public ConnectionState PreviousState { get; } /// /// Gets the current connection state. /// public ConnectionState CurrentState { get; } /// /// Gets the timestamp when the state change occurred. /// public DateTime Timestamp { get; } /// /// Gets additional information about the state change, such as error messages. /// public string? Message { get; } } }