Пример #1
0
        public HomePageViewModel(INavigationService navigationService, IEventAggregator eventAggregator, IUnsplashService unsplashService)
        {
            this.navigationService = navigationService;
            this.eventAggregator   = eventAggregator;
            this.unsplashService   = unsplashService;

            ImageTappedCommand = new Command <Photo>(ExecuteImageTappedCommand);
        }
Пример #2
0
 public MainViewModel(IUnsplashService unsplashService, ILogger <MainViewModel> logger)
 {
     _unsplashService = unsplashService ?? throw new ArgumentNullException(nameof(unsplashService));
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Пример #3
0
 public PhotoSource(IUnsplashService unsplashService, bool loadInMemory = true)
 {
     this.unsplashService = unsplashService ?? throw new ArgumentNullException(nameof(unsplashService));
     ImageCache.Instance.CacheDuration       = TimeSpan.FromHours(24);
     ImageCache.Instance.MaxMemoryCacheCount = loadInMemory ? 200 : 0;
 }