示例#1
0
        static void RunScan(IFileSystemElement fileSystemElement, ISystemScanner scanner)
        {
            var result = scanner.Scan(fileSystemElement);

            Console.WriteLine($"{scanner.GetType()} Result:");
            foreach (var suspect in result)
            {
                Console.WriteLine($"'{suspect.Name}' in '{suspect.Path}'");
            }
            if (!result.Any())
            {
                Console.WriteLine("Вирусов нет");
            }
            Console.WriteLine();
        }
示例#2
0
 /// <summary>
 /// Метод для двойной диспетчеризации файлов
 /// </summary>
 /// <see cref="ISystemScanner"/>
 public IList <Suspect> Accept(ISystemScanner scanner)
 {
     return(scanner.Scan(this));
 }