예제 #1
0
 public void EndEdit()
 {
     recoveryIntervals.Push(
         new RecoveryInterval
     {
         Start = currentRecoveryStart,
         Count = currentRecoveryCount,
     });
 }
예제 #2
0
        public void BeginEdit()
        {
            currentStage = 1;

            // Save front to history before editing
            if (history != null)
            {
                Debug.Assert(Count != 0);

                history.Push(null); // sentinel

                int count = this.Count;
                for (int i = 0; i != count; ++i)
                {
                    history.Push(front[i]);
                }
            }
        }
예제 #3
0
        public void Pop(int count)
        {
            int newCount = Count - count;

            while (currentRecoveryStart > newCount)
            {
                --currentRecoveryStart;
                ++currentRecoveryCount;
                savedTags.Push(tags[currentRecoveryStart]);
                savedData.Push(data[currentRecoveryStart]);
            }

            InternalPop(count);
        }