public HomeController(IBookService bookService, IAuthorService authorService, IRateService rateService, IWishListService wlService) { _bookService = bookService; _authorService = authorService; _rateService = rateService; _wlService = wlService; }
private WishListService() { _wishListService = RestService.For <IWishListService>(Constants.V1BaseUrl, new RefitSettings { AuthorizationHeaderValueGetter = TokenService.GetAuthToken }); }
public RequestService( IRepository <Request> requestRepository, IRepository <Book> bookRepository, IMapper mapper, IEmailSenderService emailSenderService, IRepository <User> userRepository, IPaginationService paginationService, IRepository <Language> bookLanguageRepository, IHangfireJobScheduleService hangfireJobScheduleService, IRepository <BookAuthor> bookAuthorRepository, IRepository <BookGenre> bookGenreRepository, IRepository <UserRoom> userLocationRepository, IRootRepository <BookRootComment> rootCommentRepository, IWishListService wishListService, INotificationsService notificationsService) { _requestRepository = requestRepository; _bookRepository = bookRepository; _mapper = mapper; _emailSenderService = emailSenderService; _userRepository = userRepository; _paginationService = paginationService; _hangfireJobScheduleService = hangfireJobScheduleService; _bookGenreRepository = bookGenreRepository; _bookLanguageRepository = bookLanguageRepository; _bookAuthorRepository = bookAuthorRepository; _userLocationRepository = userLocationRepository; _rootCommentRepository = rootCommentRepository; _wishListService = wishListService; _notificationsService = notificationsService; }
public RangeType(IWishListService wishListService) { Name = "RangeType"; Field(b => b.From); Field(b => b.To); Field(b => b.Total); }
public IndexModel(IWishListService wishListService, IWishListViewModelService wishListViewModelService, SignInManager <ApplicationUser> signInManager) { _wishListService = wishListService; _signInManager = signInManager; _wishListViewModelService = wishListViewModelService; }
public UserController(IUserService userService, IBaggedItemService baggedItemService, IWishListService wishListService, IOrderService orderService) { _userService = userService; _baggedItemService = baggedItemService; _wishListService = wishListService; _orderService = orderService; }
public ListResponseType(IWishListService wishListService) { Name = "ListResponseType"; Field(b => b.Data, type: typeof(ListGraphType <ListItemType>)).Description("List of Items."); Field(b => b.Range, type: typeof(RangeType)).Description("Pagination values."); Field(b => b.Public).Description("The List is Public"); Field(b => b.Name, nullable: true).Description("List Name"); }
public WishListController( UserManager <ApplicationUser> userManager, IWishListService wishListService, IBaseRepository <WishList> wishListRepository) { _userManager = userManager; _wishListService = wishListService; _wishListRepository = wishListRepository; }
public WishListController( IWishListSessionService wishListSessionService, IWishListService wishListService, IProductService productService) { _wishListSessionService = wishListSessionService; _wishListService = wishListService; _productService = productService; }
public CheckListType(IWishListService wishListService) { Name = "CheckListType"; Field(b => b.InList).Description("The procuvt is in a list"); Field(b => b.ListNames).Description("The name of the lists that have the product."); Field(b => b.message, nullable: true).Description("Message returned from data layer."); Field(b => b.ListIds).Description("The id of the product in the list."); }
public BookingController(IConfiguration config, ILogger <BookingController> logger, IBookingService orderSvc, IWishListService cartSvc, IIdentityService <ApplicationUser> identitySvc) { _identitySvc = identitySvc; _bookingSvc = orderSvc; _wishListSvc = cartSvc; _logger = logger; _config = config; }
public Mutation(IWishListService wishListService) { Name = "Mutation"; Field <IntGraphType>( "addToList", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <ListItemInputType> > { Name = "listItem" }, new QueryArgument <NonNullGraphType <StringGraphType> > { Name = "shopperId" }, new QueryArgument <StringGraphType> { Name = "name" }, new QueryArgument <BooleanGraphType> { Name = "public" } ), resolve: context => { var listItem = context.GetArgument <ListItem>("listItem"); string shopperId = context.GetArgument <string>("shopperId"); string listName = context.GetArgument <string>("name"); bool isPublic = context.GetArgument <bool>("public"); return(wishListService.SaveItem(listItem, shopperId, listName, isPublic)); }); Field <BooleanGraphType>( "removeFromList", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <IdGraphType> > { Name = "id" }, new QueryArgument <NonNullGraphType <StringGraphType> > { Name = "shopperId" }, new QueryArgument <StringGraphType> { Name = "name" } ), resolve: context => { int id = context.GetArgument <int>("id"); string shopperId = context.GetArgument <string>("shopperId"); string listName = context.GetArgument <string>("name"); return(wishListService.RemoveItem(id, shopperId, listName)); }); }
protected override void CreateIdentity(string auth) { // Configure identity base.CreateIdentity(auth); // Inject service = new WishListDataService(factory, http, googleService); controller = new WishListController(service, null, mapper) { ControllerContext = controllerContext, }; }
public StatisticsController( IStatisticsService statisticsService, IWishListService wishListService, IUserResolverService userResolverService, IRequestService requestService, IBookService bookService ) { _statisticsService = statisticsService; _wishListService = wishListService; _requestService = requestService; _userResolverService = userResolverService; _bookService = bookService; }
public WishListController( IRepository <Models.WishList> wishListRepository, IRepository <WishListItem> wishListItemRepository, IRepository <Product> productRepository, IWishListService wishListService, IMediaService mediaService, IEmailSender emailSender, IWorkContext workContext) { _wishListRepository = wishListRepository; _wishListItemRepository = wishListItemRepository; _productRepository = productRepository; _wishListService = wishListService; _mediaService = mediaService; _emailSender = emailSender; _workContext = workContext; }
public ProductController(IProductService _productService, ITagService _tagService, ICategoryService _categoryService, IProductTagService _productTagService, IManufactorService _manufactorService, IStatusService _statusService, IImageService _imageService, ICommentService _commentService, IAccountService _accountService, INotificationService _notificationService , IWishListService _wishListService) { this._productService = _productService; this._tagService = _tagService; this._categoryService = _categoryService; this._productTagService = _productTagService; this._manufactorService = _manufactorService; this._statusService = _statusService; this._imageService = _imageService; this._commentService = _commentService; this._accountService = _accountService; this._notificationService = _notificationService; this._wishListService = _wishListService; }
/// <summary> /// Initializes a new instance of the <see cref="BookPage"/> class. /// </summary> /// <param name="loggerFactory">Logger factory</param> /// <param name="menuVisualizer">Menu visualizer</param> /// <param name="outputEnvironment">Output environment implementation</param> /// <param name="clientService">Client service implementation</param> /// <param name="authService">Authorization service implementation</param> /// <param name="bookService">Book service implementation</param> /// <param name="commentService">Comment service implementation</param> /// <param name="wishListService">Wish list service implementation</param> public BookPage( ICustomLoggerFactory loggerFactory, IMenuVisualizer menuVisualizer, IOutputEnvironment outputEnvironment, IClientService clientService, IAuthService authService, IBookService bookService, ICommentService commentService, IWishListService wishListService) { this._logger = loggerFactory.CreateLogger <BookPage>(); this._outputEnvironment = outputEnvironment; this._menuVisualizer = menuVisualizer; this._clientService = clientService; this._authService = authService; this._bookService = bookService; this._commentService = commentService; this._wishListService = wishListService; }
public HomeController(IAccountService _accountService, IProductService _productService, IImageService _imageService, IManufactorService _manufactorService, ICategoryService _categoryService, IAnimeService _animeService, IWishListService _wishListService, IProductTagService _productTagService, ITagService _tagService, IBlogService _blogService, IMessageSendingService _messageSendingService, IWebsiteAttributeService _websiteAttributeService, IFAQService _faqService) { this._accountService = _accountService; this._productService = _productService; this._imageService = _imageService; this._manufactorService = _manufactorService; this._categoryService = _categoryService; this._animeService = _animeService; this._wishListService = _wishListService; this._blogService = _blogService; this._tagService = _tagService; this._productTagService = _productTagService; this._messageSendingService = _messageSendingService; this._websiteAttributeService = _websiteAttributeService; this._faqService = _faqService; }
public SearchPresenter(ISearchView view, IVenueService venueService, IWishListService wishListService, IRatingService ratingService) : base(view) { if (venueService == null) { throw new ArgumentNullException(nameof(venueService)); } this.venueService = venueService; if (wishListService == null) { throw new ArgumentNullException(nameof(wishListService)); } if (ratingService == null) { throw new ArgumentNullException(nameof(ratingService)); } this.wishListService = wishListService; this.ratingService = ratingService; this.View.QueryEvent += View_QueryEvent; this.View.SaveVenueEvent += View_SaveVenueEvent; this.View.UpdateRating += View_UpdateRating; }
public void Setup() { this._logger = A.Fake <ICustomLoggerFactory>(); this._menuVisualizer = A.Fake <IMenuVisualizer>(); this._outputEnvironment = A.Fake <IOutputEnvironment>(); this._clientService = A.Fake <IClientService>(); this._authService = A.Fake <IAuthService>(); this._bookService = A.Fake <IBookService>(); this._commentService = A.Fake <ICommentService>(); this._wishListService = A.Fake <IWishListService>(); A.CallTo(() => _bookService.GetAll()) .Returns(new List <BookDto> { new BookDto { UserCommentsId = new List <Guid> { Guid.NewGuid() }, WishedClientsId = new List <Guid> { Guid.NewGuid() } } }); A.CallTo(() => _outputEnvironment.ReadInt(A <int> ._, A <int> ._)).Returns(1); _page = new BookPage( _logger, _menuVisualizer, _outputEnvironment, _clientService, _authService, _bookService, _commentService, _wishListService); }
public WishListController(IUserService iUserService, IWishListService iWishListService, IFriendService iFriendService) : base(iUserService) { _wishListService = iWishListService; _friendService = iFriendService; }
public WishListController(IWishListService WishListService, IRepository <Customer> Customers) { this.WishListService = WishListService; this.customers = Customers; }
public WishListController(IWishListService context, ILogger <TicketController> logger, IMapper mapper) { _context = context; _logger = logger; this.mapper = mapper; }
public WishListController(IWishListService wishListService) { _wishListService = wishListService; }
public WishListController(IWishListService WishListService) { this.wishListService = WishListService; }
public WishListController(IWishListService service, IBookService bookService, IMapper mapper) { _service = service; _mapper = mapper; _bookService = bookService; }
public WishListsController(IWishListService wishListService, IMapper mapper) { _wishListService = wishListService; _mapper = mapper; }
public WishListController(IWishListService _wishListService, IMapper _mapper) { wishListService = _wishListService; mapper = _mapper; }
public LikeButton(IWishListService wishListService, IMapper mapper) { _wishListService = wishListService; _mapper = mapper; }
public Query(IWishListService wishListService) { Name = "Query"; FieldAsync <ListResponseType>( "viewList", arguments: new QueryArguments( new QueryArgument <StringGraphType> { Name = "shopperId", Description = "Shopper Id" }, new QueryArgument <StringGraphType> { Name = "name", Description = "List Name" }, new QueryArgument <IntGraphType> { Name = "from", Description = "From" }, new QueryArgument <IntGraphType> { Name = "to", Description = "To" } ), resolve: async context => { string shopperId = context.GetArgument <string>("shopperId"); string name = context.GetArgument <string>("name"); int from = context.GetArgument <int>("from"); int to = context.GetArgument <int>("to"); IList <ListItem> resultList = new List <ListItem>(); int totalCount = 0; var resultListsWrapper = await wishListService.GetList(shopperId, name); var resultListWrapper = resultListsWrapper.ListItemsWrapper.FirstOrDefault(); if (resultListWrapper != null) { if (resultListWrapper.ListItems != null) { resultList = resultListWrapper.ListItems; totalCount = resultList.Count; if (from > 0 && to > 0) { resultList = await wishListService.LimitList(resultList, from, to); } // Normalize Title field foreach (ListItem listItem in resultList) { if (string.IsNullOrWhiteSpace(listItem.Title)) { listItem.Title = string.Empty; } } } else { resultList = new List <ListItem>(); } } ListResponse listResponse = new ListResponse { Data = new DataElement { data = resultList }, Range = new ResultRange { From = from, To = to, Total = totalCount }, Public = resultListWrapper.IsPublic ?? false, Name = resultListWrapper.Name }; return(listResponse); } ); FieldAsync <ListGraphType <ListResponseType> >( "viewLists", arguments: new QueryArguments( new QueryArgument <StringGraphType> { Name = "shopperId", Description = "Shopper Id" }, new QueryArgument <IntGraphType> { Name = "from", Description = "From" }, new QueryArgument <IntGraphType> { Name = "to", Description = "To" } ), resolve: async context => { string shopperId = context.GetArgument <string>("shopperId"); int from = context.GetArgument <int>("from"); int to = context.GetArgument <int>("to"); IList <ListItem> resultList = new List <ListItem>(); IList <ListResponse> resultLists = new List <ListResponse>(); int totalCount = 0; var resultListsWrapper = await wishListService.GetLists(shopperId); if (resultListsWrapper != null && resultListsWrapper.ListItemsWrapper != null) { foreach (ListItemsWrapper listItemsWrapper in resultListsWrapper.ListItemsWrapper) { if (listItemsWrapper != null) { if (listItemsWrapper.ListItems != null) { resultList = listItemsWrapper.ListItems; totalCount = resultList.Count; if (from > 0 && to > 0) { resultList = await wishListService.LimitList(resultList, from, to); } // Normalize Title field foreach (ListItem listItem in resultList) { if (string.IsNullOrWhiteSpace(listItem.Title)) { listItem.Title = string.Empty; } } } else { resultList = new List <ListItem>(); } } ListResponse listResponse = new ListResponse { Data = new DataElement { data = resultList }, Range = new ResultRange { From = from, To = to, Total = totalCount }, Public = listItemsWrapper.IsPublic ?? false, Name = listItemsWrapper.Name }; resultLists.Add(listResponse); } } return(resultLists); } ); FieldAsync <CheckListType>( "checkList", arguments: new QueryArguments( new QueryArgument <StringGraphType> { Name = "shopperId", Description = "Shopper Id" }, new QueryArgument <StringGraphType> { Name = "productId", Description = "Product Id" }, new QueryArgument <StringGraphType> { Name = "sku", Description = "Product Sku" } ), resolve: async context => { string shopperId = context.GetArgument <string>("shopperId"); string productId = context.GetArgument <string>("productId"); string sku = context.GetArgument <string>("sku"); ResponseListWrapper resultListWrapper = await wishListService.GetLists(shopperId); List <string> namesList = new List <string>(); List <int> idsList = new List <int>(); CheckListResponse checkListResponse = null; if (resultListWrapper != null && resultListWrapper.ListItemsWrapper != null) { foreach (ListItemsWrapper listItemsWrapper in resultListWrapper.ListItemsWrapper) { ListItem listItem = new ListItem(); if (!string.IsNullOrEmpty(sku)) { listItem = listItemsWrapper.ListItems.FirstOrDefault(l => l.ProductId.Equals(productId, StringComparison.OrdinalIgnoreCase) && l.Sku.Equals(sku, StringComparison.OrdinalIgnoreCase)); } else { listItem = listItemsWrapper.ListItems.FirstOrDefault(l => l.ProductId.Equals(productId, StringComparison.OrdinalIgnoreCase)); } if (listItem != null) { namesList.Add(listItemsWrapper.Name); idsList.Add(listItem.Id ?? -1); } } checkListResponse = new CheckListResponse { InList = namesList.Count > 0, ListNames = namesList.ToArray(), ListIds = idsList.ToArray(), message = resultListWrapper.message }; } else { checkListResponse = new CheckListResponse { InList = false, ListNames = new string[0], ListIds = new int[0], message = resultListWrapper != null ? resultListWrapper.message : "No records returned." }; } return(checkListResponse); } ); FieldAsync <StringGraphType>( "listNames", arguments: new QueryArguments( new QueryArgument <StringGraphType> { Name = "shopperId", Description = "Shopper Id" } ), resolve: async context => { string shopperId = context.GetArgument <string>("shopperId"); ResponseListWrapper allLists = await wishListService.GetLists(shopperId); IList <ListItemsWrapper> listItemsWrappers = allLists.ListItemsWrapper; var distinctListNames = listItemsWrappers.GroupBy(elem => elem.Name).Select(group => group.First()); var listName = distinctListNames.Select(n => n.Name); return(listName.ToArray()); } ); }