/// <summary> /// Initializes a new instance of the <see cref="TransactionalHandler" /> class. /// </summary> /// <param name="adapter">Used to monitor all transactions.</param> /// <param name="storage">Used to temporarily store domain events until the transaction have been committed.</param> /// <param name="threadBatchIdMapper">Used to map batch ids to threads</param> public TransactionalHandler(IUnitOfWorkAdapter adapter, IDomainEventStorage storage, IThreadBatchIdMapper threadBatchIdMapper) { if (adapter == null) throw new ArgumentNullException("adapter"); if (storage == null) throw new ArgumentNullException("storage"); _storage = storage; adapter.Register(this); _threadBatchIdMapper = threadBatchIdMapper; }
/// <summary> /// Initializes a new instance of the <see cref="TransactionalHandler" /> class. /// </summary> /// <param name="adapter">Used to monitor all transactions.</param> /// <param name="storage">Used to temporarily store domain events until the transaction have been committed.</param> /// <param name="threadBatchIdMapper">Used to map batch ids to threads</param> public TransactionalHandler(IUnitOfWorkAdapter adapter, IDomainEventStorage storage, IThreadBatchIdMapper threadBatchIdMapper) { if (adapter == null) { throw new ArgumentNullException("adapter"); } if (storage == null) { throw new ArgumentNullException("storage"); } _storage = storage; adapter.Register(this); _threadBatchIdMapper = threadBatchIdMapper; }