Class HttpExceptionDescriptorResponseHandlerExtensions
- Assembly
- Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.dll
Extension methods for the HttpExceptionDescriptorResponseHandler class.
public static class HttpExceptionDescriptorResponseHandlerExtensions
- Inheritance
-
ObjectHttpExceptionDescriptorResponseHandlerExtensions
Methods
AddNewtonsoftJsonResponseHandler(ICollection<HttpExceptionDescriptorResponseHandler>, IOptions<NewtonsoftJsonFormatterOptions>)
Adds an HttpExceptionDescriptorResponseHandler to the list of handlers
that uses Newtonsoft.Json.JsonSerializer as engine of serialization.
[Obsolete("This method will be removed in near future; please use extension method AddNewtonsoftJsonExceptionResponseFormatter when configuring your services.")]
public static ICollection<HttpExceptionDescriptorResponseHandler> AddNewtonsoftJsonResponseHandler(this ICollection<HttpExceptionDescriptorResponseHandler> handlers, IOptions<NewtonsoftJsonFormatterOptions> options)
Parameters
handlers
ICollection<HttpExceptionDescriptorResponseHandler>The sequence of HttpExceptionDescriptorResponseHandler to extend.
options
IOptions<NewtonsoftJsonFormatterOptions>The NewtonsoftJsonFormatterOptions which need to be configured.
Returns
- ICollection<HttpExceptionDescriptorResponseHandler>
A reference to
handlers
so that additional calls can be chained.
Exceptions
- System.ArgumentNullException
handlers
cannot be null