public static bool IsHandler(Type t) => t.CanBeInstantiated() && MessageHandlerDiscoverer.IsHandlerType(t);
/// <summary> /// Returns null if the type isn't a handler /// </summary> /// <param name="t"></param> /// <returns></returns> public static TypeWithHandlers TryCreateFrom(Type t) => MessageHandlerDiscoverer.GetHandledMessageTypes(t).IsNullOrEmpty() ? null : new TypeWithHandlers(t, MessageHandlerDiscoverer.GetHandledMessageTypes(t));