예제 #1
0
 public void SubscribeToCommand <TCommand>(string queueName) where TCommand : ICommand
 {
     _busClient.SubscribeAsync <TCommand>(async(command, context) =>
     {
         var commandHandler = _customDependencyResolver.Resolve <ICommandHandler <TCommand> >();
         await commandHandler.HandleAsync(command);
     }, cfg => cfg.WithQueue(q => q.WithName(queueName)));
 }
 public IErrorResult Execute <TException>(TException exception) where TException : MyCustomException
 => _customDependencyResolver.Resolve <IExceptionHandler <TException> >().Handle(exception);
 public INeo4jSession Create()
 => _customDependencyResolver.Resolve <INeo4jSession>();
예제 #4
0
 public TService Get(IUnitOfWork unitOfWork)
 {
     return(_resolver.Resolve <TService, IUnitOfWork>("unitOfWork", unitOfWork));
 }