using System;

namespace ZB.MOM.WW.LmxProxy.Host.Domain
{
    /// <summary>
    ///     Event arguments for SCADA client connection state changes.
    /// </summary>
    public class ConnectionStateChangedEventArgs : EventArgs
    {
        public ConnectionStateChangedEventArgs(ConnectionState previousState, ConnectionState currentState,
            string? message = null)
        {
            PreviousState = previousState;
            CurrentState = currentState;
            Timestamp = DateTime.UtcNow;
            Message = message;
        }

        public ConnectionState PreviousState { get; }
        public ConnectionState CurrentState { get; }
        public DateTime Timestamp { get; }
        public string? Message { get; }
    }
}
