mhinze / ShortBus

In-process mediator with low-friction API
MIT License
210 stars 41 forks source link

CommandHandler as abstract class #18

Closed zachariahyoung closed 10 years ago

zachariahyoung commented 10 years ago

When we have the CommandHandler as a abstract class we can't have a single class with multiple handlers. I was hoping to have one handler class per entity .

Something like this.

CommentHandler : CommandHandler, CommandHandler

Does creating class like this make sense or should I bee create a single handler class for each command?

If not should we thinking the abstract class

mhinze commented 10 years ago

You can still implement the interface, the ABC is very thin..

jrnail23 commented 10 years ago

Yep, the abstract CommandHandler is really just a convenience thing, to save you from having to remember to

return UnitType.Default;

at the end of each handler.