Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BasketServiceController" /> class.
        /// </summary>
        /// <param name="productRepositoryLocator">The repository locator.</param>
        /// <param name="sessionManager">The session manager.</param>
        public BasketServiceController(IProductRepositoryLocator productRepositoryLocator, ISessionManager sessionManager)
        {
            Guard.ArgumentNotNull(productRepositoryLocator, "productRepositoryLocator");
            Guard.ArgumentNotNull(sessionManager, "sessionManager");

            this.productRepositoryLocator = productRepositoryLocator;
            this.sessionManager = sessionManager;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BasketServiceController" /> class.
        /// </summary>
        /// <param name="productRepositoryLocator">The repository locator.</param>
        /// <param name="sessionManager">The session manager.</param>
        /// <param name="productLocatorService">The product locator service.</param>
        public BasketServiceController(IProductRepositoryLocator productRepositoryLocator, ISessionManager sessionManager, ProductLocatorService productLocatorService)
        {
            Guard.ArgumentNotNull(productRepositoryLocator, "productRepositoryLocator");
            Guard.ArgumentNotNull(sessionManager, "sessionManager");
            Guard.ArgumentNotNull(productLocatorService, "productLocatorService");

            this.productRepositoryLocator = productRepositoryLocator;
            this.sessionManager           = sessionManager;
            this.productLocatorService    = productLocatorService;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProductLocatorService" /> class.
 /// </summary>
 /// <param name="productRepositoryLocator">The product locator.</param>
 public ProductLocatorService(IProductRepositoryLocator productRepositoryLocator)
 {
     this.productJumpTable.Add(typeof(Book).Name, productRepositoryLocator.BookRepository.FetchById);
     this.productJumpTable.Add(typeof(Movie).Name, productRepositoryLocator.MovieRepository.FetchById);
 }