public ImageProcessorService( IImageRepositoryService imageRepository, ITextMessagingService textMessagingService, IOptions <ImageProcessingOptions> processingOptions, IOptions <ImageCaptureOptions> captureOptions, ILogger <ImageProcessorService> logger) { _imageRepository = imageRepository ?? throw new ArgumentNullException(nameof(imageRepository)); _textMessagingService = textMessagingService ?? throw new ArgumentNullException(nameof(textMessagingService)); _processingOptions = processingOptions?.Value ?? throw new ArgumentNullException(nameof(processingOptions)); _captureOptions = captureOptions?.Value ?? throw new ArgumentNullException(nameof(captureOptions)); _logger = logger; }
public IActionResult ShareGif(string id, [FromServices] IImageRepositoryService imageRepository) => Json(imageRepository.GetGifUrl(id));