sharp-chat/SharpChat.Protocol.IRC/ClientCommands/ClientCommandContext.cs
2022-08-30 17:05:29 +02:00

20 lines
679 B
C#

using SharpChat.Sessions;
using SharpChat.Users;
using System;
using System.Collections.Generic;
namespace SharpChat.Protocol.IRC.ClientCommands {
public class ClientCommandContext {
public IRCConnection Connection { get; }
public IEnumerable<string> Arguments { get; }
public ISession Session => Connection.Session;
public ILocalUser User => Session?.User;
public ClientCommandContext(IRCConnection connection, IEnumerable<string> args) {
Connection = connection ?? throw new ArgumentNullException(nameof(connection));
Arguments = args ?? throw new ArgumentNullException(nameof(args));
}
}
}