예제 #1
0
 /// <summary>
 /// Initializes a new instance of GatherDifferencesDescriptor.
 /// </summary>
 /// <param name="entityType">The type of the file system entities this descriptor works with.</param>
 /// <param name="targetFileSystemTable">The LFS file system table to be compared against a reference version.</param>
 /// <param name="comparer">The comparison function to use to determine if a reference and target file system entity are different.</param>
 /// <param name="validator">The validation function to use to determine if an entry is valid.</param>
 /// <param name="ignorer">The function to use to determine whether to ignore an entry for computing differences.</param>
 public GatherDifferencesDescriptor(LfsEntityType entityType, FixedSizeCollection <T> targetFileSystemTable, FileSystemEntryComparer <T> comparer, FileSystemEntryValidator <T> validator, Predicate <T> ignorer)
 {
     TargetFileSystemTable = targetFileSystemTable;
     Compare    = comparer;
     Validate   = validator ?? AlwaysValid;
     Ignore     = ignorer ?? NeverIgnore;
     EntityType = entityType;
 }
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var imageFileFactory        = new ImageFileFactory();
            var imageResizer            = new ImageResizer();
            var fileSystemEntryComparer = new FileSystemEntryComparer();
            var discQueryEngine         = new DiscQueryEngine(imageFileFactory, imageResizer, fileSystemEntryComparer);

            var imageViewFactory = new ImageViewFactory();
            var mainView         = new MainView(imageViewFactory);

            var visualActionDispatcher   = new VisualActionDispatcher(Dispatcher);
            var folderVisualStateFactory = new FolderVisualStateFactory();

            new MainPresenter(discQueryEngine, mainView, visualActionDispatcher, folderVisualStateFactory);
            mainView.Show();
        }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of GatherDifferencesDescriptor.
 /// </summary>
 /// <param name="entityType">The type of the file system entities this descriptor works with.</param>
 /// <param name="targetFileSystemTable">The LFS file system table to be compared against a reference version.</param>
 /// <param name="comparer">The comparison function to use to determine if a reference and target file system entity are different.</param>
 /// <param name="validator">The validation function to use to determine if an entry is valid.</param>
 public GatherDifferencesDescriptor(LfsEntityType entityType, FixedSizeCollection <T> targetFileSystemTable, FileSystemEntryComparer <T> comparer, FileSystemEntryValidator <T> validator)
     : this(entityType, targetFileSystemTable, comparer, validator, NeverIgnore)
 {
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of GatherDifferencesDescriptor.
 /// </summary>
 /// <param name="entityType">The type of the file system entities this descriptor works with.</param>
 /// <param name="targetFileSystemTable">The LFS file system table to be compared against a reference version.</param>
 /// <param name="comparer">The comparison function to use to determine if a reference and target file system entity are different.</param>
 public GatherDifferencesDescriptor(LfsEntityType entityType, FixedSizeCollection <T> targetFileSystemTable, FileSystemEntryComparer <T> comparer)
     : this(entityType, targetFileSystemTable, comparer, AlwaysValid)
 {
 }