Table of Contents

Class HttpExceptionDescriptorResponseHandlerExtensions

Namespace
Cuemon.Extensions.AspNetCore.Diagnostics
Assembly
Cuemon.Extensions.AspNetCore.dll

Extension methods for the HttpExceptionDescriptorResponseHandler class.

public static class HttpExceptionDescriptorResponseHandlerExtensions
Inheritance
Object
HttpExceptionDescriptorResponseHandlerExtensions

Methods

AddResponseHandler(ICollection<HttpExceptionDescriptorResponseHandler>, Action<HttpExceptionDescriptorResponseHandlerOptions>)

Adds an HttpExceptionDescriptorResponseHandler to the list of handlers.

[Obsolete("This method will be removed in near future.")]
public static ICollection<HttpExceptionDescriptorResponseHandler> AddResponseHandler(this ICollection<HttpExceptionDescriptorResponseHandler> handlers, Action<HttpExceptionDescriptorResponseHandlerOptions> setup)

Parameters

handlers ICollection<HttpExceptionDescriptorResponseHandler>

The sequence of HttpExceptionDescriptorResponseHandler to extend.

setup Action<HttpExceptionDescriptorResponseHandlerOptions>

The HttpExceptionDescriptorResponseHandlerOptions that needs to be configured.

Returns

ICollection<HttpExceptionDescriptorResponseHandler>

A reference to handlers so that additional calls can be chained.

Exceptions

System.ArgumentNullException

handlers cannot be null - or - setup cannot be null.

AddYamlResponseHandler(ICollection<HttpExceptionDescriptorResponseHandler>, IOptions<YamlFormatterOptions>)

Adds an HttpExceptionDescriptorResponseHandler to the list of handlers that uses YamlFormatter as engine of serialization.

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

Parameters

handlers ICollection<HttpExceptionDescriptorResponseHandler>

The sequence of HttpExceptionDescriptorResponseHandler to extend.

options IOptions<YamlFormatterOptions>

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