public IMediaType GetMediaType(string contentType) { var mediaType = mediaTypes.Find(contentType); if (mediaType == null) { throw new ContentTypeNotSupportedException(); } return(mediaType); }