public LrpOutputFormatter(ISupportedMedia lrpSupportedMedia, JsonSerializerSettings serializerSettings, ArrayPool <char> charPool) : base(serializerSettings, charPool) { SupportedMediaTypes.Clear(); foreach (var type in lrpSupportedMedia.Types) { SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(type)); } }
public MediaTypeMiddleware(RequestDelegate next, ISupportedMedia supportedMedia) { _next = next ?? throw new ArgumentNullException(nameof(next)); _supportedMedia = supportedMedia ?? throw new ArgumentNullException(nameof(supportedMedia)); }