Table of Contents

Class HttpExceptionDescriptorResponseHandlerOptions

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

Specifies options that is related to HttpExceptionDescriptorResponseHandler operations.

public class HttpExceptionDescriptorResponseHandlerOptions : IValidatableParameterObject, IParameterObject
Inheritance
HttpExceptionDescriptorResponseHandlerOptions
Implements

Constructors

HttpExceptionDescriptorResponseHandlerOptions()

Initializes a new instance of the HttpExceptionDescriptorResponseHandlerOptions class.

public HttpExceptionDescriptorResponseHandlerOptions()

Remarks

The following table shows the initial property values for an instance of HttpExceptionDescriptorResponseHandlerOptions.

PropertyInitial Value
ContentFactorynull
ContentTypenull
StatusCodeFactorynull

Properties

ContentFactory

Gets or sets the function delegate that will create an instance of HttpContent with input from the specified HttpExceptionDescriptor.

public Func<HttpExceptionDescriptor, HttpContent> ContentFactory { get; set; }

Property Value

Func<HttpExceptionDescriptor, HttpContent>

The function delegate that will create an instance of HttpContent with input from the specified HttpExceptionDescriptor.

Remarks

This property is required and cannot be null.

ContentType

Gets or sets the supported media-type of the response.

public MediaTypeHeaderValue ContentType { get; set; }

Property Value

MediaTypeHeaderValue

The supported media-type of the response.

Remarks

This property is required and cannot be null.

StatusCodeFactory

Gets or sets the function delegate that will return a HttpStatusCode value with input from the specified HttpExceptionDescriptor.

public Func<HttpExceptionDescriptor, HttpStatusCode> StatusCodeFactory { get; set; }

Property Value

Func<HttpExceptionDescriptor, HttpStatusCode>

The function delegate that will return a HttpStatusCode value with input from the specified HttpExceptionDescriptor.

Remarks

This property is required and cannot be null.

Methods

ValidateOptions()

Determines whether the public read-write properties of this instance are in a valid state.

public void ValidateOptions()

Remarks

This method is expected to throw exceptions when one or more conditions fails to be in a valid state.

Exceptions

InvalidOperationException

ContentFactory cannot be null - or - ContentType cannot be null - or - StatusCodeFactory cannot be null.

See Also