public void has_changes_positive_with_any_deleted() { var set = new ChangeSet(); set.Deleted.Add(new StubFubuFile("foo", DateTime.Now).RelativePath); set.HasChanges().ShouldBeTrue(); }
public void Handle(ChangeSet changes) { var added = _parent.readFiles(changes.Added.Select(x => _root.AppendPath(x.RelativePath))); var modified = _parent.readFiles(changes.Changed.Select(x => _root.AppendPath(x.RelativePath))); Task.WhenAll(added, modified).ContinueWith(t => _parent._browser.RefreshPage()); }
void IChangeSetHandler.Handle(ChangeSet changes) { if (changes.Added.Concat(changes.Changed).Any(x => FileChangeShouldRegenerateTopicTree(x.Path)) || changes.Deleted.Any()) { _project.ReadTopics(); _refresher.RefreshPage(); } else { _refresher.RefreshPage(); } }
public ChangeSet DetectChanges(IEnumerable<IFubuFile> files) { var changeSet = new ChangeSet(); var dict = files.ToDictionary(x => x.RelativePath); var deleted = _files.GetAllKeys().Where(x => !dict.ContainsKey(x)); changeSet.Deleted.AddRange(deleted); changeSet.Added.AddRange(files.Where(x => !_files.Has(x.RelativePath))); var changed = files.Where(x => _files.Has(x.RelativePath) && _files[x.RelativePath] != x.ExactLastWriteTime()); changeSet.Changed.AddRange(changed); return changeSet; }
void IChangeSetHandler.Handle(ChangeSet changes) { _connector.SendMessageToClient(new RefreshPage()); }
public void Handle(ChangeSet changes) { _observer.RefreshContent(); }
public void Handle(ChangeSet changes) { changes.Changed.Each(x => _observer.Changed(x.Path)); changes.Deleted.Each(x => _observer.Deleted(x)); changes.Added.Each(x => _observer.Added(x.Path)); }
void IChangeSetHandler.Handle(ChangeSet changes) { LastChanges = changes; }
public void SetUp() { LastChanges = null; theDirectory = Guid.NewGuid().ToString().ToFullPath(); Directory.CreateDirectory(theDirectory); }
public void has_changes_negative() { var set = new ChangeSet(); set.HasChanges().ShouldBeFalse(); }
void IChangeSetHandler.Handle(ChangeSet changes) { Console.WriteLine("Detected binary file changes at {0}: {1}", _watcher.Root, changes); _callback(); }