Created
September 1, 2010 14:16
-
-
Save smoothdeveloper/560739 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// thing that hold state | |
public interface ISwitchableBehaviourState<TThingToAlter> | |
{ | |
void RegisterThingToAlterWithReversibleAction(TThingToAlter thingToAlter, Func<TThingToAlter, Action<TThingToAlter>> reversibleAction); | |
} | |
// thing that will be manipulated | |
public interface ISwitchableBehaviourActuator | |
{ | |
void EnlistReversibleActionAsCompoundBehaviour<TThingToAlter>(TThingToAlter thingToAlter, | |
Func<TThingToAlter, Action<TThingToAlter>> | |
reversibleAction); | |
void ActivateIfNotAlreadyActivated(); | |
void DesactivateIfActivated(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment