public ITextSource CreateSnapshot()
{
lock (lockObject) {
return new RopeTextSource(rope, versionProvider.CurrentVersion);
}
}
TextDocument::CreateSnapshot ( int offset, int length ) : ITextSource |
public void NoChanges() { TextDocument document = new TextDocument("initial text"); ITextSource snapshot1 = document.CreateSnapshot(); ITextSource snapshot2 = document.CreateSnapshot(); Assert.AreEqual(0, snapshot1.Version.CompareAge(snapshot2.Version)); Assert.AreEqual(0, snapshot1.Version.GetChangesTo(snapshot2.Version).Count()); Assert.AreEqual(document.Text, snapshot1.Text); Assert.AreEqual(document.Text, snapshot2.Text); }