public NServiceBusUnitOfWork(ILog logger, NHibernateStorageContext nHibernateStorageContext, IRepository repository, IBus bus)
 {
     _logger = logger;
     _nHibernateStorageContext = nHibernateStorageContext;
     _repository = repository;
     _bus        = bus;
 }
        public OrderSubmittedHandler(IBus bus, NHibernateStorageContext storageContext)
        {
            this.Bus            = bus;
            this.StorageContext = storageContext;

            // Extract this transaction here for reuse as when transactions are disabled the call to storageContext.DatabaseTransaction
            this.IsTransactionEnabled = CheckTransactionEnabled(storageContext);
        }
 private bool CheckTransactionEnabled(NHibernateStorageContext storageContext)
 {
     // When transaction are disabled DatabaseTransaction throws an exception
     // Therefore this helper hide this.
     try
     {
         var tx = storageContext.DatabaseTransaction;
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Beispiel #4
0
 public PaymentTransactionCompletedSagaFinder(NHibernateStorageContext storageContext)
 {
     this.storageContext = storageContext;
 }
 public OrderHandler(NHibernateStorageContext dataContext)
 {
     this.dataContext = dataContext;
 }
Beispiel #6
0
 public CompleteOrderSagaFinder(NHibernateStorageContext storageContext)
 {
     this.storageContext = storageContext;
 }
Beispiel #7
0
 public OrderSubmittedHandler(IBus bus, NHibernateStorageContext storageContext)
 {
     this.bus            = bus;
     this.storageContext = storageContext;
 }
 public OrderPlacedHandler(NHibernateStorageContext nHibernateStorageContext)
 {
     this.nHibernateStorageContext = nHibernateStorageContext;
 }
 public StartOrderSagaFinder(NHibernateStorageContext storageContext)
 {
     this.storageContext = storageContext;
 }
 public AddNewApplicationHandler(IBus bus, ITestRepositoryContextFactory contextFactory, NHibernateStorageContext storageContext)
 {
     _bus            = bus;
     _contextFactory = contextFactory;
     _storageContext = storageContext;
 }
Beispiel #11
0
 public OrderSaga(NHibernateStorageContext dataContext)
 {
     this.dataContext = dataContext;
 }
 public ProductShippedHandler(IBus bus, NHibernateStorageContext storageContext, IRepository _repository)
 {
     repository = _repository;
 }