public ProductService(IMessageRepositoryFactory messageRepositoryFactory, IProductRepositoryFactory productRepositoryFactory)
 {
     if (messageRepositoryFactory == null) throw new ArgumentNullException("MessageRepositoryFactory");
     if (productRepositoryFactory == null) throw new ArgumentNullException("ProductRepositoryFactory");
     _messageRepositoryFactory = messageRepositoryFactory;
     _productRepositoryFactory = productRepositoryFactory;
     _messageRepository = _messageRepositoryFactory.Create();
     _productRepository = _productRepositoryFactory.Create();
 }
Exemple #2
0
 public ProductService(IMessageRepositoryFactory messageRepositoryFactory, IProductRepositoryFactory productRepositoryFactory)
 {
     if (messageRepositoryFactory == null)
     {
         throw new ArgumentNullException("MessageRepositoryFactory");
     }
     if (productRepositoryFactory == null)
     {
         throw new ArgumentNullException("ProductRepositoryFactory");
     }
     _messageRepositoryFactory = messageRepositoryFactory;
     _productRepositoryFactory = productRepositoryFactory;
     _messageRepository        = _messageRepositoryFactory.Create();
     _productRepository        = _productRepositoryFactory.Create();
 }
 public ProductProcessor(IProductRepositoryFactory productRepositoryFactory)
 {
     this.productRepositoryFactory = productRepositoryFactory;
 }
 public ProductCommandsHandler(IProductRepositoryFactory repositoryFactory)
 {
     this.repositoryFactory = repositoryFactory ?? throw new ArgumentNullException(nameof(repositoryFactory));
 }
Exemple #5
0
 public ProductPersistenceService(IProductRepositoryFactory productRepositoryFactory, IFactory factory)
 {
     _productRepositoryFactory = productRepositoryFactory;
     _factory = factory;
 }