Example #1
0
 public ViewModel()
 {
     var uiThreadMarshaller = new UIThreadMarshaller(SynchronizationContext.Current);
     _model = new Model(@"c:\git\Duplicates\TestData\",
                        new ListBuilderService(new MD5HashCalculator(), uiThreadMarshaller), new FileRetrieverServiceService(new MainThreadInvoker(SynchronizationContext.Current), new FileInfoImplemantation()));
 }
Example #2
0
        private void Initialize()
        {
            var uiThreadMarshaller = new UIThreadMarshaller(SynchronizationContext.Current);
            var hashCalculator = radioButtonMd5.Checked
                                     ? (IChecksumCalculator) new MD5HashCalculator()
                                     : new Sha256HashCalculator();

            _listBuilderServiceService = new ListBuilderService(hashCalculator, uiThreadMarshaller);
            var mainThreadInvoker = new MainThreadInvoker(SynchronizationContext.Current);
            new FileListBuilderPresenter(this, _listBuilderServiceService, new FileRetrieverServiceService(mainThreadInvoker, new FileInfoImplemantation()),uiThreadMarshaller);
            _initialPathSelectrorPresenter = new InitialPathSelectrorPresenter(this);
        }