public void Purge(IUndoContext context)
 {
     lock (m_lockObject)
     {
         if (context == null)
         {
             UndoStack = new Stack <CUndoItem>(64);
             RedoStack = new Stack <CUndoItem>(64);
         }
         else
         {
             UndoStack = new Stack <CUndoItem>(UndoStack.Where(item => item.UndoContext != context));
             RedoStack = new Stack <CUndoItem>(RedoStack.Where(item => item.UndoContext != context));
         }
     }
 }
Example #2
0
 public static void Purge(IUndoContext context)
 {
     Instance?.Purge(context);
 }