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));
     }
 }
示例#2
0
 public MediaTypeMiddleware(RequestDelegate next, ISupportedMedia supportedMedia)
 {
     _next           = next ?? throw new ArgumentNullException(nameof(next));
     _supportedMedia = supportedMedia ?? throw new ArgumentNullException(nameof(supportedMedia));
 }