public TextBufferTypingSession(RdTextBuffer buffer) { Assertion.Assert(!buffer.IsMaster, "Master version is not implemented"); myBuffer = buffer; myInitialBufferVersion = myBuffer.BufferVersion; myVersionBeforeOpening = myBuffer.Delegate.VersionBeforeTypingSession.Value; }
public TextBufferTypingSession(RdTextBuffer buffer) { myBuffer = buffer; myInitialBufferVersion = myBuffer.BufferVersion; if (buffer.IsMaster) { myVersionBeforeOpening = myBuffer.BufferVersion; myBuffer.Delegate.VersionBeforeTypingSession.Value = myInitialBufferVersion; } else { myVersionBeforeOpening = buffer.Delegate.VersionBeforeTypingSession.Value; } }