public MessageHandlerWrapper(
     IServiceScopeFactory serviceScopeFactory,
     Type handlerType,
     Type baseHandlerType)
 {
     _serviceScopeFactory = serviceScopeFactory;
     _handlerType         = handlerType;
     _baseHandlerType     = baseHandlerType;
     HandlerPriority      = MessageHandlerPriorityAttribute.GetPriority(typeof(TMessage), _handlerType);
     if (MessageHandlerLifetimeAttribute.GetHandlerLifetime(_handlerType) == MessageHandlerLifetime.Singleton)
     {
         _handler = GetIocMessageHandler();
     }
 }
 public MessageHandlerWrapper(
     IServiceScopeFactory serviceScopeFactory,
     Type handlerType)
 {
     _serviceScopeFactory = serviceScopeFactory;
     MessageName          = MessageNameAttribute.GetNameOrDefault(typeof(TMessage));
     MessageType          = typeof(TMessage);
     HandlerType          = handlerType;
     HandlerPriority      = MessageHandlerPriorityAttribute.GetPriority(typeof(TMessage), handlerType);
     if (MessageHandlerLifetimeAttribute.GetHandlerLifetime(handlerType) == MessageHandlerLifetime.Singleton)
     {
         _handler = GetIocMessageHandler();
     }
 }