Пример #1
0
        private void _beLogic_ServerUpdateHandler(object sender, ServerCommandEventArgs e)
        {
            switch (e.Command.CommandType)
            {
            case CommandType.Players:
                _playersUpdater.Update(e.Command.ServerId);
                break;

            case CommandType.Bans:
                _bansUpdater.Update(e.Command.ServerId);
                break;

            case CommandType.Admins:
                _adminsUpdater.Update(e.Command.ServerId);
                break;

            case CommandType.Missions:
                _missionsUpdater.Update(e.Command.ServerId);
                break;

            default:
                _aggregator.GetEvent <BEMessageEvent <BECommand> >()
                .Publish(e.Command);
                break;
            }
        }
Пример #2
0
 private void _beLogic_ServerImmediateUpdateHandler(object sender, ServerCommandEventArgs e)
 {
     _aggregator.GetEvent <BEMessageEvent <BECommand> >()
     .Publish(e.Command);
 }