The interface used by IUndoSupport's and UndoEngine's BeginCompoundEdit(String, String) implementation.

Namespace: yWorks.Support
Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 2.4.0.0

Syntax

C#
public interface ICompoundEdit : IDisposable
Visual Basic
Public Interface ICompoundEdit _ Inherits IDisposable

Remarks

UndoEngine and IUndoSupport implementations create instances of this class. You don't have to implement this class yourself. This class serves as a token for compound edits, only. Once this token has been obtained from the engine, it is essential for the functionality of the issuer of this instance that either End()()()() or Cancel()()()() be called.
If this instance gets disposed before either of the End()()()() or Cancel()()()() method has been called, the End()()()() method will be called automatically. This allows for using this instance with a using statement:
CopyC#
using (ICompoundEdit edit = support.BeginEdit("Undo", "Redo")) {

  ...

  if (!success) {
    edit.Cancel();
  }
}

See Also