AddResponseHandler Method
Definition
- Namespace
- Cuemon.AspNetCore.Diagnostics
- Assemblies
- Cuemon.AspNetCore.dll
AddResponseHandler(IDecorator<ICollection<HttpExceptionDescriptorResponseHandler>>, Action<HttpExceptionDescriptorResponseHandlerOptions>)
Adds an HttpExceptionDescriptorResponseHandler to the underlying list of HttpExceptionDescriptorResponseHandler from the specified the decorator.
public static ICollection<HttpExceptionDescriptorResponseHandler> AddResponseHandler(this IDecorator<ICollection<HttpExceptionDescriptorResponseHandler>> decorator, Action<HttpExceptionDescriptorResponseHandlerOptions> setup)
Parameters
decoratorIDecorator<ICollection<HttpExceptionDescriptorResponseHandler>>The IDecorator<T> to extend.
setupAction<HttpExceptionDescriptorResponseHandlerOptions>The HttpExceptionDescriptorResponseHandlerOptions that needs to be configured.
Returns
- ICollection<HttpExceptionDescriptorResponseHandler>
A reference to Inner of
decoratorso that additional calls can be chained.
Exceptions
- ArgumentNullException
decoratorcannot be null - or - Inner property ofdecoratorcannot be null - or -setupcannot be null.- ArgumentException
setupfailed to configure an instance of HttpExceptionDescriptorResponseHandlerOptions in a valid state.