public HomePageViewModel(INavigationService navigationService, IEventAggregator eventAggregator, IUnsplashService unsplashService) { this.navigationService = navigationService; this.eventAggregator = eventAggregator; this.unsplashService = unsplashService; ImageTappedCommand = new Command <Photo>(ExecuteImageTappedCommand); }
public MainViewModel(IUnsplashService unsplashService, ILogger <MainViewModel> logger) { _unsplashService = unsplashService ?? throw new ArgumentNullException(nameof(unsplashService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
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; }