Exemple #1
0
        public FileResult(ReplayFileInfo fileInfo, ReplayFile replayFile)
        {
            FileInfo   = fileInfo ?? throw new ArgumentNullException(nameof(fileInfo));
            ReplayFile = replayFile ?? throw new ArgumentNullException(nameof(replayFile));

            Id               = FileInfo.Path;
            FileName         = FileInfo.Name;
            FileSizeBytes    = FileInfo.FileSizeBytes;
            FileCreationTime = FileInfo.CreationTime;
            PlayerNames      = string.Join("|", ReplayFile.Players.Select(x => x.NAME.ToUpper(CultureInfo.InvariantCulture)));
            ChampionNames    = string.Join("|", ReplayFile.Players.Select(x => x.SKIN.ToUpper(CultureInfo.InvariantCulture)));
        }
Exemple #2
0
        public FileResult(ReplayFileInfo fileInfo, ReplayFile replayFile)
        {
            FileInfo   = fileInfo ?? throw new ArgumentNullException(nameof(fileInfo));
            ReplayFile = replayFile ?? throw new ArgumentNullException(nameof(replayFile));

            Id = FileInfo.Path;

            SearchKeywords = $"{FileInfo.Name.ToUpper(CultureInfo.InvariantCulture)};" +
                             $"{ReplayFile.AlternativeName.ToUpper(CultureInfo.InvariantCulture)};" +
                             $"{string.Join("|", ReplayFile.Players.Select(x => x.NAME.ToUpper(CultureInfo.InvariantCulture)))};" +
                             $"{string.Join("|", ReplayFile.Players.Select(x => x.SKIN.ToUpper(CultureInfo.InvariantCulture)))}";

            FileName         = FileInfo.Name;
            AlternativeName  = replayFile.AlternativeName;
            FileSizeBytes    = FileInfo.FileSizeBytes;
            FileCreationTime = FileInfo.CreationTime;
            //PlayerNames = string.Join("|", ReplayFile.Players.Select(x => x.NAME.ToUpper(CultureInfo.InvariantCulture)));
            //ChampionNames = string.Join("|", ReplayFile.Players.Select(x => x.SKIN.ToUpper(CultureInfo.InvariantCulture)));
        }