public HomePageViewModel(INavigationService navigationService, IItemListService itemListService, IEventAggregator eventAggregator) : base(navigationService) { _itemListService = itemListService; _eventAggregator = eventAggregator; Title = "ホーム"; Items = _itemListService.Items.ToReadOnlyReactiveCollection(i => new ItemViewModel(i)).AddTo(_disposables); LoadMoreCommand.Subscribe(async item => { if (item == Items?.LastOrDefault()) { await _itemListService.LoadAsync(); } }); GoToContributionPageCommand.Subscribe(async() => await NavigateAsync <ContributionPageViewModel>()); GoToItemDetailPageCommand.Subscribe(async viewModel => await NavigateAsync <ItemDetailPageViewModel, string>(viewModel.Id.Value)); _eventAggregator.GetEvent <DestoryEvent>().Subscribe(_itemListService.Close) .AddTo(_disposables); _itemListService.LoadAsync(); }
public UserGroupService(DataContext context, IOptions <AppSettings> appSettings, IUserService userService, IItemListService itemListService) { _context = context; _appSettings = appSettings.Value; _userService = userService; _itemListService = itemListService; }
public ItemListsController(IMapper mapper, IOptions <AppSettings> appSettings, IItemListService itemListService, IItemService itemService) { _mapper = mapper; _appSettings = appSettings.Value; _itemListService = itemListService; _itemService = itemService; }
public UserGroupsController( IMapper mapper, IOptions <AppSettings> appSettings, IUserGroupService userGroupService, IItemListService itemListService) { _mapper = mapper; _appSettings = appSettings.Value; _userGroupService = userGroupService; _itemListService = itemListService; }
public ItemListsController(IMapper mapper, IItemListService itemListService) { _mapper = mapper; _itemListService = itemListService; }