Exemplo n.º 1
0
 public void Execute()
 {
     // This instance gets created after the buffer has already been modified
     // so don't exec this method the first time it gets called.
     if (!canExecute)
     {
         canExecute = true;
         return;
     }
     using (var ed = buffer.CreateEdit(afterReiteratedVersionNumber, HexBufferUndoRedo.UndoRedoObject)) {
         foreach (var change in changes)
         {
             bool b = ed.Replace(change.OldPosition, change.NewData);
             Debug.Assert(b);
         }
         ed.Apply();
     }
 }