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 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)); }
public ProductPersistenceService(IProductRepositoryFactory productRepositoryFactory, IFactory factory) { _productRepositoryFactory = productRepositoryFactory; _factory = factory; }