public AlbumsRepository(ILogger logger, HttpClient httpClient, IOptions <JsonPlaceholderOptions> jsonPlaceholderOptions, IPhotosRepository photosRepository) { _logger = (logger?.ForContext <AlbumsRepository>()).ThrowIfNull(nameof(logger)); _httpClient = httpClient.ThrowIfNull(nameof(httpClient)); _photosRepository = photosRepository.ThrowIfNull(nameof(photosRepository)); _jsonPlaceholderOptions = jsonPlaceholderOptions?.Value.ThrowIfNull(nameof(jsonPlaceholderOptions)); }
public AlbumsController(ILogger logger, IAlbumsRepository albumsRepository, IPhotosRepository photosRepository) { _logger = (logger?.ForContext <AlbumsController>()).ThrowIfNull(nameof(logger)); _albumsRepository = albumsRepository.ThrowIfNull(nameof(albumsRepository)); _photosRepository = photosRepository.ThrowIfNull(nameof(photosRepository)); }