Add channel system with CLI, Telegram, and Web channel implementations
Define channel abstractions (IChannel, IChannelManager) with event-driven message and connection handling. Implement ChannelManager for multi-channel orchestration, CliChannel for terminal I/O, TelegramChannel with adapter pattern for bot API integration, and WebChannel stub. Includes DI registration and channel type enumeration.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace Luna.Channels.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// Event arguments for channel connection state changes
|
||||
/// </summary>
|
||||
public class ChannelConnectionEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The channel whose connection state changed
|
||||
/// </summary>
|
||||
public required IChannel Channel { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The previous connection state
|
||||
/// </summary>
|
||||
public bool WasConnected { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// The new connection state
|
||||
/// </summary>
|
||||
public bool IsConnected { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional error message if connection failed
|
||||
/// </summary>
|
||||
public string? ErrorMessage { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user