public SummonerSpellAnalyzer(IReportLog reportLog, IReadOnlyDictionary <int, string> summonerData)
        {
            m_ReportLog = reportLog ?? throw new ArgumentNullException(nameof(reportLog));

            m_SummonerData = summonerData
                             ?? throw new ArgumentNullException(nameof(summonerData));
        }
        public PredefinedNameStrippingAnalyzer(IReportLog reportLog,
                                               IEnumerable <string> suspiciousNames,
                                               INameAnalyzer underlyingAnalyzer)
        {
            m_ReportLog = reportLog ?? throw new ArgumentNullException(nameof(reportLog));

            m_UnderlyingAnalyzer = underlyingAnalyzer
                                   ?? throw new ArgumentNullException(nameof(underlyingAnalyzer));

            m_SuspiciousNames = suspiciousNames.OrderByDescending(x => x.Length).ToArray();
        }
Exemplo n.º 3
0
 public RunesAnalyzer(IReportLog reportLog, IReadOnlyDictionary <int, string> runeData)
 {
     m_ReportLog = reportLog ?? throw new ArgumentNullException(nameof(reportLog));
     m_RuneData  = runeData ?? throw new ArgumentNullException(nameof(runeData));
 }
Exemplo n.º 4
0
 public CasingPatternNameAnalyzer(IReportLog reportLog)
 {
     m_ReportLog = reportLog
                   ?? throw new ArgumentNullException(nameof(reportLog));
 }
Exemplo n.º 5
0
        private static void Main(string[] args)
        {
            m_Log = new ConsoleLogger()
                    .WithConsoleColours()
                    .WithTimeStampLogging(DateTimeKind.Local)
                    .WithLogLevelPrefixes();

            m_ReportLog = new FileReportLog(m_Log);

            m_MatchAnalyzer = CreateCompositeAnalyzer();

            m_NameAnalyzer = CreateNameAnalyzer();

            m_MatchRepository    = new MatchRepository(CreateHttpClient, m_Log);
            m_SummonerRepository = new SummonerRepository(CreateHttpClient, m_Log);

            var patientZero = m_SummonerRepository.GetAccountBySummonerName("uEeTLydia");

            RunAnalysis(patientZero);

            while (true)
            {
                var toSearch = AccountsToAnalyze.ToArray();

                if (toSearch.Length == 0)
                {
                    m_Log.Log("We have no accounts to search, something's clearly wrong, exiting :D", LogLevel.error);
                    Environment.Exit(0);
                }

                foreach (var n in toSearch)
                {
                    Console.WriteLine();

                    AccountsToAnalyze.RemoveAll(a => a.AccountId == n.AccountId);
                    try
                    {
                        if (File.Exists($@".\Reports\{n.SummonerName}.json"))
                        {
                            m_Log.Log($"Already analysed {n.SummonerName}, skipping", LogLevel.info);
                            continue;
                        }
                        var next = m_SummonerRepository.GetAccountById(n.AccountId);
                        if (File.Exists($@".\Reports\{next.SummonerName}.json"))
                        {
                            m_Log.Log($"Already analysed {next.SummonerName}, skipping", LogLevel.info);
                            continue;
                        }
                        RunAnalysis(next);
                    }
                    catch (SummonerRepositoryFailureException)
                    {
                        m_Log.Log($"{n.SummonerName} has played no bot games", LogLevel.info);
                    }
                    finally
                    {
                        AnalyzedAccounts.Add(n);
                    }
                }
            }
        }
Exemplo n.º 6
0
 public MinionsKilledAnalyzer(IReportLog reportLog)
 {
     m_ReportLog = reportLog;
 }
Exemplo n.º 7
0
 public VisionAnalyzer(IReportLog reportLog)
 {
     m_ReportLog = reportLog ?? throw new ArgumentNullException(nameof(reportLog));
 }