sharp-chat/SharpChat.Protocol.SockChat/Commands/CommandContext.cs

30 lines
1 KiB
C#
Raw Normal View History

2022-08-30 15:05:29 +00:00
using SharpChat.Channels;
using SharpChat.Sessions;
using SharpChat.Users;
using System;
using System.Collections.Generic;
namespace SharpChat.Protocol.SockChat.Commands {
public class CommandContext {
public IEnumerable<string> Args { get; }
public ILocalUser User { get; }
public IChannel Channel { get; }
public ISession Session { get; }
public SockChatConnection Connection { get; }
public CommandContext(
IEnumerable<string> args,
ILocalUser user,
IChannel channel,
ISession session,
SockChatConnection connection
) {
Args = args ?? throw new ArgumentNullException(nameof(args));
User = user ?? throw new ArgumentNullException(nameof(user));
Channel = channel ?? throw new ArgumentNullException(nameof(channel));
Session = session ?? throw new ArgumentNullException(nameof(session));
Connection = connection ?? throw new ArgumentNullException(nameof(connection));
}
}
}