Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Command Maps API - lose getMapping() , add unmap().fromAll() #90

Stray opened this Issue Jul 22, 2012 · 2 comments


None yet
2 participants

Stray commented Jul 22, 2012

getMapping - why?

getMapping gives you forCommand which then returns ICommandMapConfig.

From there you can't read anything - which would seem to be the most obvious usecase - all you can do is add more guards and hooks, and configure once - all of which are likely to result in it blowing up unless you exactly duplicate the current situation (so that mappings can't be messed about with at runtime other than by explicitly unmapping).

I can't think of a valid use case for this (except that it makes testing easier!)


Seems like a useful sugar method, as well as a good way to clear existing mappings when you apply a new rule set.

I'll go ahead and implement this as I'm in the code right now, knowing that we can unwind the changes. Comments welcome.


darscan commented Jul 22, 2012

Sounds good. I think getMapping is used by the derived extensions (EventCommandMap, MessageCommandMap).. but if you can find a way around that, go ahead.


Stray commented Jul 22, 2012

I think it might have been at some point, but it's not currently in use - was only being used in tests. (Other than in specifically supporting their own getMapping methods - which are the same thing). Yay for deleting code...

@Stray Stray closed this Nov 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment