Table of Contents

Class HttpExceptionDescriptorResponseHandlerExtensions

Namespace
Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json
Assembly
Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json.dll

Extension methods for the HttpExceptionDescriptorResponseHandler class.

public static class HttpExceptionDescriptorResponseHandlerExtensions
Inheritance
Object
HttpExceptionDescriptorResponseHandlerExtensions

Methods

AddJsonResponseHandler(ICollection<HttpExceptionDescriptorResponseHandler>, IOptions<JsonFormatterOptions>)

Adds an HttpExceptionDescriptorResponseHandler to the list of handlers that uses System.Text.Json.JsonSerializer as engine of serialization.

[Obsolete("This method will be removed in near future; please use extension method AddJsonExceptionResponseFormatter when configuring your services.")]
public static ICollection<HttpExceptionDescriptorResponseHandler> AddJsonResponseHandler(this ICollection<HttpExceptionDescriptorResponseHandler> handlers, IOptions<JsonFormatterOptions> options)

Parameters

handlers ICollection<HttpExceptionDescriptorResponseHandler>

The sequence of HttpExceptionDescriptorResponseHandler to extend.

options IOptions<JsonFormatterOptions>

The JsonFormatterOptions 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.