public void Add(AbstractHandler handler) { var types = handler.SupportedMessageTypes().ToList(); if (types.Count == 0) { allTypes.Add(handler); } foreach (var type in types) { this.GetSet(type).Add(handler); } }