C# 클래스 Illusion.ActionManager

Action Manager is a central class for the Undo Framework. Your domain model (business objects) will have an ActionManager reference that would take care of executing actions. Here's how it works: 1. You declare a class that implements IAction 2. You create an instance of it and give it all necessary info that it needs to know to apply or rollback a change 3. You call ActionManager.RecordAction(yourAction) Then you can also call ActionManager.Undo() or ActionManager.Redo()
상속: IActionManager
파일 보기 프로젝트 열기: kasicass/kasicass

Private Properties

프로퍼티 타입 설명
CheckNotRunningBeforeRecording void
RunActionDirectly void

공개 메소드들

메소드 설명
ActionManager ( ) : System

Initializes a new instance of the ActionManager class.

BeginTransaction ( ) : void

Begins the transaction.

CancelTransaction ( ) : void

Cancels the transaction.

Clear ( ) : void

Clears this instance.

CommitTransaction ( ) : void

Commits the transaction.

CreateTransaction ( ) : Transaction

Creates the transaction.

CreateTransaction ( bool delayed ) : Transaction

Creates the transaction.

EnumUndoableActions ( ) : IEnumerable

Enums the undoable actions.

Execute ( IAction action ) : void

Executes the specified action.

IsInTransaction ( ) : bool

Determines whether is in transaction.

OpenTransaction ( ITransaction t ) : void

Opens the transaction.

RecordAction ( IAction existingAction ) : void

Central method to add and execute a new action.

RecordOrExcuteAction ( IAction existingAction ) : void

Records the or excute action.

Recover ( ) : void

Recovers this instance from exception.

Redo ( ) : void

Redoes this instance.

RollBackTransaction ( ) : void

Rolls the back transaction.

Undo ( ) : void

Undoes this instance.

보호된 메소드들

메소드 설명
RaiseUndoBufferChanged ( object sender, EventArgs e ) : void

Raises the undo buffer changed.

비공개 메소드들

메소드 설명
CheckNotRunningBeforeRecording ( IAction existingAction ) : void

Checks the not running before recording.

RunActionDirectly ( IAction actionToRun ) : void

Adds the action to the buffer and runs it

메소드 상세

ActionManager() 공개 메소드

Initializes a new instance of the ActionManager class.
public ActionManager ( ) : System
리턴 System

BeginTransaction() 공개 메소드

Begins the transaction.
public BeginTransaction ( ) : void
리턴 void

CancelTransaction() 공개 메소드

Cancels the transaction.
public CancelTransaction ( ) : void
리턴 void

Clear() 공개 메소드

Clears this instance.
public Clear ( ) : void
리턴 void

CommitTransaction() 공개 메소드

Commits the transaction.
public CommitTransaction ( ) : void
리턴 void

CreateTransaction() 공개 메소드

Creates the transaction.
public CreateTransaction ( ) : Transaction
리턴 Transaction

CreateTransaction() 공개 메소드

Creates the transaction.
public CreateTransaction ( bool delayed ) : Transaction
delayed bool if set to true [delayed].
리턴 Transaction

EnumUndoableActions() 공개 메소드

Enums the undoable actions.
public EnumUndoableActions ( ) : IEnumerable
리턴 IEnumerable

Execute() 공개 메소드

Executes the specified action.
public Execute ( IAction action ) : void
action IAction The action.
리턴 void

IsInTransaction() 공개 메소드

Determines whether is in transaction.
public IsInTransaction ( ) : bool
리턴 bool

OpenTransaction() 공개 메소드

Opens the transaction.
public OpenTransaction ( ITransaction t ) : void
t ITransaction The t.
리턴 void

RaiseUndoBufferChanged() 보호된 메소드

Raises the undo buffer changed.
protected RaiseUndoBufferChanged ( object sender, EventArgs e ) : void
sender object The sender.
e System.EventArgs The instance containing the event data.
리턴 void

RecordAction() 공개 메소드

Central method to add and execute a new action.
public RecordAction ( IAction existingAction ) : void
existingAction IAction An action to be recorded in the buffer and executed
리턴 void

RecordOrExcuteAction() 공개 메소드

Records the or excute action.
public RecordOrExcuteAction ( IAction existingAction ) : void
existingAction IAction The existing action.
리턴 void

Recover() 공개 메소드

Recovers this instance from exception.
public Recover ( ) : void
리턴 void

Redo() 공개 메소드

Redoes this instance.
public Redo ( ) : void
리턴 void

RollBackTransaction() 공개 메소드

Rolls the back transaction.
public RollBackTransaction ( ) : void
리턴 void

Undo() 공개 메소드

Undoes this instance.
public Undo ( ) : void
리턴 void