Table of Contents

Class HttpStatusCodeExceptionDecoratorExtensions

Namespace
Cuemon.AspNetCore.Http
Assembly
Cuemon.AspNetCore.dll

Extension methods for the HttpStatusCodeException class hidden behind the IDecorator<T> interface.

public static class HttpStatusCodeExceptionDecoratorExtensions
Inheritance
HttpStatusCodeExceptionDecoratorExtensions

Methods

AddResponseHeaders<T>(IDecorator<T>, IHeaderDictionary)

Adds all non-existing headers to the enclosed HttpStatusCodeException of the decorator.

public static IDecorator<T> AddResponseHeaders<T>(this IDecorator<T> decorator, IHeaderDictionary headers)
    where T : HttpStatusCodeException

Parameters

decorator IDecorator<T>

The IDecorator<T> to extend.

headers IHeaderDictionary

The Microsoft.AspNetCore.Http.IHeaderDictionary to populate into the enclosed HttpStatusCodeException.

Returns

IDecorator<T>

Type Parameters

T

Exceptions

ArgumentNullException

decorator cannot be null -or- headers cannot be null.

AddResponseHeaders<T>(IDecorator<T>, HttpResponseHeaders)

Adds all non-existing headers to the enclosed HttpStatusCodeException of the decorator.

public static IDecorator<T> AddResponseHeaders<T>(this IDecorator<T> decorator, HttpResponseHeaders headers)
    where T : HttpStatusCodeException

Parameters

decorator IDecorator<T>

The IDecorator<T> to extend.

headers HttpResponseHeaders

The HttpResponseHeaders to populate into the enclosed HttpStatusCodeException.

Returns

IDecorator<T>

Type Parameters

T

Exceptions

ArgumentNullException

decorator cannot be null -or- headers cannot be null.

See Also