Exemplo n.º 1
0
 /// <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);
     }));
 }
Exemplo n.º 2
0
 /// <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)));
 }