Changed very long and ugly if-statement in the HubEventHandler to a factory with DI-Magic