Exemple #1
0
        private byte[] GetZipBytesForChecker(string code)
        {
            var excluded = (PathsToExcludeForChecker ?? new string[0])
                           .Concat(initialPatterns)
                           .Concat(wrongAnswerPatterns)
                           .ToList();

            var toUpdateDirectories = PathsToIncludeForChecker
                                      .Select(pathToInclude => new DirectoryInfo(Path.Combine(UnitDirectory.FullName, pathToInclude)));

            var toUpdate = GetCodeFile(code).ToList();
            var zipBytes = ToZip(ExerciseDirectory, excluded, toUpdate, toUpdateDirectories);

            log.Info($"Собираю zip-архив для проверки: zip-архив собран, {zipBytes.Length} байтов");
            return(zipBytes);
        }