public LogSearchEventsParser(LogSearchParameters logSearchParameters, IWurmApi wurmApi, ILogger logger)
        {
            if (logSearchParameters == null)
            {
                throw new ArgumentNullException("logSearchParameters");
            }
            if (wurmApi == null)
            {
                throw new ArgumentNullException("wurmApi");
            }
            this.logSearchParameters = logSearchParameters;
            this.wurmApi             = wurmApi;

            CombatStatus = new CombatStatus(logSearchParameters.CharacterName);
            processor    = new CombatResultsProcessor(CombatStatus, logger, wurmApi);
        }
Пример #2
0
        public LiveLogsEventsMonitor(string characterName, IWurmApi wurmApi, ILogger logger)
        {
            if (characterName == null)
            {
                throw new ArgumentNullException("characterName");
            }
            if (wurmApi == null)
            {
                throw new ArgumentNullException("wurmApi");
            }
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            this.characterName = characterName;
            this.wurmApi       = wurmApi;
            this.logger        = logger;

            CombatStatus = new CombatStatus(characterName);
            processor    = new CombatResultsProcessor(CombatStatus, logger, wurmApi);

            wurmApi.LogsMonitor.Subscribe(characterName, LogType.AllLogs, LogHandler);
        }