feat(lmxproxy): phase 1 — v2 protocol types and domain model
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
|
||||
namespace ZB.MOM.WW.LmxProxy.Client.Domain;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the connection state of an LmxProxy client.
|
||||
/// </summary>
|
||||
public enum ConnectionState
|
||||
{
|
||||
/// <summary>Not connected to the server.</summary>
|
||||
Disconnected,
|
||||
|
||||
/// <summary>Connection attempt in progress.</summary>
|
||||
Connecting,
|
||||
|
||||
/// <summary>Connected and ready for operations.</summary>
|
||||
Connected,
|
||||
|
||||
/// <summary>Graceful disconnect in progress.</summary>
|
||||
Disconnecting,
|
||||
|
||||
/// <summary>Connection failed with an error.</summary>
|
||||
Error,
|
||||
|
||||
/// <summary>Attempting to re-establish a lost connection.</summary>
|
||||
Reconnecting
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event arguments for connection state change notifications.
|
||||
/// </summary>
|
||||
public class ConnectionStateChangedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>The previous connection state.</summary>
|
||||
public ConnectionState OldState { get; }
|
||||
|
||||
/// <summary>The new connection state.</summary>
|
||||
public ConnectionState NewState { get; }
|
||||
|
||||
/// <summary>Optional message describing the state change (e.g., error details).</summary>
|
||||
public string? Message { get; }
|
||||
|
||||
public ConnectionStateChangedEventArgs(ConnectionState oldState, ConnectionState newState, string? message = null)
|
||||
{
|
||||
OldState = oldState;
|
||||
NewState = newState;
|
||||
Message = message;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user