Tanoda
GILES.UndoReflection Class Reference
Inheritance diagram for GILES.UndoReflection:
GILES.IUndo

Public Member Functions

 UndoReflection (object target, string member)
 
 UndoReflection (object target, MemberInfo info)
 
Hashtable RecordState ()
 
void ApplyState (Hashtable hash)
 
void OnExitScope ()
 
Hashtable RecordState ()
 
void ApplyState (Hashtable values)
 
void OnExitScope ()
 

Public Attributes

object target
 
string memberName
 

Detailed Description

Undo setting a value with reflection.

Definition at line 10 of file UndoReflection.cs.

Constructor & Destructor Documentation

◆ UndoReflection() [1/2]

GILES.UndoReflection.UndoReflection ( object  target,
string  member 
)

Definition at line 15 of file UndoReflection.cs.

◆ UndoReflection() [2/2]

GILES.UndoReflection.UndoReflection ( object  target,
MemberInfo  info 
)

Definition at line 21 of file UndoReflection.cs.

Member Function Documentation

◆ ApplyState()

void GILES.UndoReflection.ApplyState ( Hashtable  values)

Apply the recorded state to the target object using the values stored by RecordState.

Implements GILES.IUndo.

Definition at line 37 of file UndoReflection.cs.

◆ OnExitScope()

void GILES.UndoReflection.OnExitScope ( )

Called when a state is purged from the undo or redo stack. Commonly used by objects to release memory once no longer needed.

Implements GILES.IUndo.

Definition at line 42 of file UndoReflection.cs.

◆ RecordState()

Hashtable GILES.UndoReflection.RecordState ( )

Record the current state of the target object. RecordState() should grab the current state of the object pointed to, not the current state as stored.

RecordState should return a hashtable that contains all the information necessary to reconstitute the object. How the data is stored is up to the implementation, since it is also left to the implementing class to reconstruct itself using this same information in ApplyState.

Implements GILES.IUndo.

Definition at line 27 of file UndoReflection.cs.

Member Data Documentation

◆ memberName

string GILES.UndoReflection.memberName

Definition at line 13 of file UndoReflection.cs.

◆ target

object GILES.UndoReflection.target

Definition at line 12 of file UndoReflection.cs.


The documentation for this class was generated from the following file: