private static void ProcessFile(CacheEntryRemovedArguments arguments) { Console.WriteLine($"* cache item removes: {arguments.CacheItem.Key} because {arguments.RemovedReason}"); if (arguments.RemovedReason == CacheEntryRemovedReason.Expired) { var procesor = new FileProcessor(arguments.CacheItem.Key); procesor.Process(); } else { Console.WriteLine($"Warning: {arguments.CacheItem.Key} removed unexpectedly."); } }
private static void ProcessSingleFile(string filePath) { var fileProcessor = new FileProcessor(filePath); fileProcessor.Process(); }