Пример #1
0
        private void Delete()
        {
            ILocalSyncTable localSyncTable = new LocalSyncTable(".");
            ILocalFileSystem localFileSystem = new LocalFileSystem();

            localSyncTable.CollectRepoFiles(localFile =>
                                            _remoteSyncTable.FilterExistingFiles(localFile, missingRemoteFile =>
                                                {
                                                    missingRemoteFile = localFileSystem.EnrichWithRepoRoot(missingRemoteFile);
                                                    _ui.LogBeginOfOperation(missingRemoteFile);
                                                    missingRemoteFile = localSyncTable.DeleteEntry(missingRemoteFile);
                                                    missingRemoteFile = localFileSystem.Delete(missingRemoteFile);
                                                    _ui.LogEndOfOperation(missingRemoteFile);
                                                }));
        }
Пример #2
0
        private void Delete()
        {
            ILocalSyncTable localSyncTable = new LocalSyncTable(".");
            ILocalFileSystem localFileSystem = new LocalFileSystem();
            IUi ui = new Ui();

            localSyncTable.CollectRepoFiles(repoFile =>
                {
                    repoFile = localFileSystem.EnrichWithRepoRoot(repoFile);
                    localFileSystem.FilterExistingFiles(repoFile, r =>
                        {
                            ui.LogBeginOfOperation(repoFile);
                            r = _remoteSyncTable.DeleteEntry(r);
                            r = _remoteFileStore.Delete(r);
                            r = localSyncTable.DeleteEntry(r);
                            ui.LogEndOfOperation(r);
                        });
                });
        }