Ejemplo n.º 1
0
        public ScriptClient(Chat chat, IPacketWriterFactory writerFactory, ScriptMessageSender messageSender, IScriptMessageHandlerSelector handlerSelector, ILoggerFactory loggerFactory)
        {
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            _Chat            = chat ?? throw new ArgumentNullException(nameof(chat));
            _WriterFactory   = writerFactory;
            _MessageSender   = messageSender ?? throw new ArgumentNullException(nameof(messageSender));
            _HandlerSelector = handlerSelector ?? throw new ArgumentNullException(nameof(handlerSelector));
            this.BaseClient  = new GameClient(this);

            _Log = loggerFactory.GetLogger(GetType());
        }
Ejemplo n.º 2
0
 public LeaveGameSender(IPacketWriterFactory packetWriterFactory, ScriptMessageSender sender)
 {
     _PacketWriterFactory = packetWriterFactory ?? throw new ArgumentNullException(nameof(packetWriterFactory));
     _Sender = sender ?? throw new ArgumentNullException(nameof(sender));
 }