Created
July 21, 2012 21:11
-
-
Save neilmanuell/3157202 to your computer and use it in GitHub Desktop.
Mapping separate commands with Guards and Hooks to same Event type
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
commandmap | |
.map( Event.COMPLETE, Event ) | |
.toCommand( DispatchProcessEvent ) | |
.withHooks( InjectMakeAbsoluteProcess ) | |
.withGuards( OnlyIfReasonNotAbsolute ); | |
commandmap | |
.map( Event.COMPLETE, Event ) | |
.toCommand( DispatchProcessEvent ) | |
.withHooks( InjectMakeEvenProcess ) | |
.withGuards( OnlyIfReasonNotEven ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment