Exemplo n.º 1
0
 public ProductController(IUnitOfWorkFactory factory)
 {
     _service   = new ProductService(factory);
     _assembler = new ProductAssembler(new ConditionAssembler(),
                                       new GenreAssembler(),
                                       new ProductTypeAssembler());
 }
        public BuyOfferController(IUnitOfWorkFactory factory, IRatingUpdater ratingUpdater)
        {
            _service = new BuyOfferService(factory);

            _buyAssembler = new BuyOfferAssembler(new ProductAssembler(new ConditionAssembler(),
                                                                       new GenreAssembler(),
                                                                       new ProductTypeAssembler()),
                                                  new UserAssembler(new AddressAssembler()));
            _sellAssembler = new SellOfferAssembler(new ProductAssembler(new ConditionAssembler(),
                                                                         new GenreAssembler(),
                                                                         new ProductTypeAssembler()),
                                                    new UserAssembler(new AddressAssembler()));
            _transactionService = new TransactionService(factory, ratingUpdater);
        }
Exemplo n.º 3
0
 public UserController(IUnitOfWorkFactory factory)
 {
     _service       = new AuthenticationService(factory);
     _userAssembler = new UserAssembler(new AddressAssembler());
     _assembler     = new AuthenticationAssembler(_userAssembler);
 }
Exemplo n.º 4
0
 public UserAssembler(ITwoWayAssembler <UserAddress, AddressDto> assembler)
 {
     _assembler = assembler;
 }
 public AuthenticationAssembler(ITwoWayAssembler <users, UserDto> assembler)
 {
     _assembler = assembler;
 }
 public SellOfferAssembler(ITwoWayAssembler <product, ProductDto> assembler, ITwoWayAssembler <users, UserDto> userAssembler)
 {
     _assembler     = assembler;
     _userAssembler = userAssembler;
 }