Ejemplo n.º 1
0
        protected virtual TransactionalBus BuildMessageBus(IComponentContext c)
        {
            var bus = new MessageBus(
                c.Resolve<ITransportMessages>(),
                c.Resolve<IStoreSubscriptions>(),
                this.endpoints,
                c.ResolveOptional<IMessageContext>() ?? c.Resolve<NullMessageContext>(),
                c.Resolve<MessageBuilder>(),
                c.Resolve<IDiscoverMessageTypes>());

            // TODO: optionally resolve if one is already active
            return new TransactionalBus(c.Resolve<IHandleUnitOfWork>(), bus);
        }
Ejemplo n.º 2
0
 public TransactionalBus(IHandleUnitOfWork unitOfWork, MessageBus inner)
 {
     // Null UoW?
     this.unitOfWork = unitOfWork;
     this.inner = inner;
 }
Ejemplo n.º 3
0
 public TransactionalBus(IHandleUnitOfWork unitOfWork, MessageBus inner)
 {
     // Null UoW?
     this.unitOfWork = unitOfWork;
     this.inner      = inner;
 }