Exemple #1
0
        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.");
            }
        }
Exemple #2
0
        private static void ProcessSingleFile(string filePath)
        {
            var fileProcessor = new FileProcessor(filePath);

            fileProcessor.Process();
        }