public void CommitRemoteChanges() { Assertion.Assert(myState == State.Opened, "myState == State.Opened"); myState = State.Committing; for (var i = myLocalChanges.Count - 1; i >= 0; i--) { var change = myLocalChanges[i]; myBuffer.myTextChanged.SetValue(change.Reverse()); } myBuffer.BufferVersion = myInitialBufferVersion; foreach (var bufferChange in myRemoteChanges) { myBuffer.ReceiveChange(bufferChange); } }
public void FinishCommitRemoteVersion() { if (!myBuffer.IsMaster) { for (var i = myLocalChanges.Count - 1; i >= 0; i--) { var change = myLocalChanges[i]; myBuffer.myTextChanged.SetValue(change.Reverse()); } } myBuffer.BufferVersion = myInitialBufferVersion; foreach (var bufferChange in myRemoteChanges) { myBuffer.ReceiveChange(bufferChange); } }