Exemple #1
0
        public MatchManager(ILogger <MatchManager> logger,
                            ICharacterCollection charColl, IItemCollection itemColl,
                            IRealtimeEventBroadcastService events, IMatchEventBroadcastService matchEvents,
                            IRealtimeMonitor realtime, IChallengeEventBroadcastService challengeEvents,
                            IMatchMessageBroadcastService matchMessages, IAdminMessageBroadcastService adminMessages,
                            IChallengeManager challenges, ISecondTimer timer)
        {
            _Logger = logger ?? throw new ArgumentNullException(nameof(logger));

            _CharacterColleciton = charColl ?? throw new ArgumentNullException(nameof(charColl));
            _ItemCollection      = itemColl ?? throw new ArgumentNullException(nameof(itemColl));

            _Realtime        = realtime ?? throw new ArgumentNullException(nameof(realtime));
            _RealtimeEvents  = events ?? throw new ArgumentNullException(nameof(events));
            _MatchEvents     = matchEvents ?? throw new ArgumentNullException(nameof(matchEvents));
            _ChallengeEvents = challengeEvents ?? throw new ArgumentNullException(nameof(challengeEvents));

            _MatchMessages = matchMessages ?? throw new ArgumentNullException(nameof(matchMessages));
            _AdminMessages = adminMessages ?? throw new ArgumentNullException(nameof(adminMessages));
            _Challenges    = challenges ?? throw new ArgumentNullException(nameof(challenges));

            _Timer = timer ?? throw new ArgumentNullException(nameof(timer));

            SetSettings(new MatchSettings());

            AddListeners();
        }
 public HostedRealtimeMonitor(IRealtimeMonitor mon)
 {
     _Monitor = mon;
 }