public SearchTabViewModel(IFlickrService flickrService,
                                  IDialogService dialogService,
                                  IPhotoSearchService photoSearchService)
        {
            _flickrService      = flickrService;
            _dialogService      = dialogService;
            _photoSearchService = photoSearchService;

            SortOrder         = Enum.GetValues(typeof(PhotoSearchSortOrder)).Cast <PhotoSearchSortOrder>();
            SelectedSortOrder = PhotoSearchSortOrder.Relevance;

            SearchCommand = new AsyncCommand(ExecuteSearchCommand);
        }
Пример #2
0
        public SearchService(IUnitOfWorkFactory workFactory, IPhotoSearchService photoSearchService,
                             IUserSearchService userSearchService, IAlbumSearchService albumSearchService,
                             ICommentSearchService commentSearchService,
                             ISearchCacheTask searchCacheTask)
            : base(workFactory)
        {
            this.photoSearchService   = photoSearchService;
            this.userSearchService    = userSearchService;
            this.albumSearchService   = albumSearchService;
            this.commentSearchService = commentSearchService;

            this.searchCacheTask = searchCacheTask;
        }