Exemple #1
0
        private static void FileNavigatorDemo()
        {
            var leafProvider  = new FileSystemLeafProvider();
            var nodeProvider  = new FileSystemNodeProvider();
            var fileNavigator = new LazyLeafTraverser("c:/files/test", leafProvider, nodeProvider);

            foreach (var fileInformation in fileNavigator)
            {
                Console.WriteLine(fileInformation.RelativePath);
            }
        }
Exemple #2
0
        private static void LazyDiffChecker()
        {
            var leftPath  = @"c:/files/test/project-one";
            var rightPath = @"c:/files/test/project-two";


            var             leafComparer    = new FileSystemLeafComparer();
            var             leafProvider    = new FileSystemLeafProvider();
            var             nodeProvider    = new FileSystemNodeProvider();
            LazyDiffChecker lazyDiffChecker = new LazyDiffChecker(leftPath, rightPath, leafComparer, leafProvider, nodeProvider);

            foreach (var fileDifference in lazyDiffChecker)
            {
                Console.WriteLine($"[{fileDifference.DifferenceType}]: ");
            }
        }