/// <summary> /// /// </summary> /// <param name="mq"></param> /// <param name="type"></param> /// <returns></returns> public static Task <IMQ> SubscibeTypeAsync(this IMQ mq, Type type) { return(Task.Run(() => { return mq.SubscibeType(type); })); }
/// <summary> /// 订阅<typeparamref name="THandler"/>的所有<seealso cref="IHandler{TMessage}"/>接口的实现 /// </summary> /// <typeparam name="THandler"></typeparam> /// <param name="mq"></param> /// <returns></returns> public static IMQ SubscibeType <THandler>(this IMQ mq) where THandler : IHandler { return(mq.SubscibeType(typeof(THandler))); }