/* Add a newly saved document to the dictionary for future reference. */ public void AddSavedDocument(IDocument document) { if (HasSaved(document)) { dictionary.Remove(document.Id.UniqueName); } dictionary.Add(document.Id.UniqueName, document.GetTextVersion()); }
/* Whether a document differs from its previous version. */ public bool IsDocumentUpdated(IDocument document) { if (HasSaved(document)) { VersionStamp version; dictionary.TryGetValue(document.Id.UniqueName, out version); return document.GetTextVersion().IsNewerThan(version); } return true; }
/* Whether a document differs from its previous version. */ public bool IsDocumentUpdated(IDocument document) { if (HasSaved(document)) { VersionStamp version; dictionary.TryGetValue(document.Id, out version); return version != document.GetTextVersion(); } return true; }