0

I have a class with plenty of handlers for some controls that require exactly the same parameters. Those handlers are linked in runtime and also need to be linked from other classes, for example, a factory class to create the controls.

What I want to ask is if creating a class containing the whole amount of the handlers, and then, referencing an instance of this class from different points of the code, so I can add a handler to a event defined inside this class, is a good practice or is just a noob solution to a problably design problem.

Ed.
  • 846
  • 6
  • 24

1 Answers1

1

Sounds like you need to use a command pattern

Mark Dickinson
  • 6,573
  • 4
  • 29
  • 41