Ejemplo n.º 1
0
            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);
                }
            }
Ejemplo n.º 2
0
            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);
                }
            }