Table of Contents

Class FaultDescriptorOptionsDecoratorExtensions

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

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

public static class FaultDescriptorOptionsDecoratorExtensions
Inheritance
FaultDescriptorOptionsDecoratorExtensions

Methods

TryResolveHttpExceptionDescriptor<T>(IDecorator<T>, Exception, HttpContext, Action<HttpExceptionDescriptor>, out HttpExceptionDescriptor)

Tries to resolve an HttpExceptionDescriptor from the specified failure and context.

public static bool TryResolveHttpExceptionDescriptor<T>(this IDecorator<T> decorator, Exception failure, HttpContext context, Action<HttpExceptionDescriptor> onBeforeExceptionFactory, out HttpExceptionDescriptor descriptor)
    where T : FaultDescriptorOptions

Parameters

decorator IDecorator<T>

The decorator that encapsulates the FaultDescriptorOptions.

failure Exception

The Exception that represents the failure.

context HttpContext

The Microsoft.AspNetCore.Http.HttpContext in which the failure occurred.

onBeforeExceptionFactory Action<HttpExceptionDescriptor>

A delegate to invoke just before the ExceptionCallback is called.

descriptor HttpExceptionDescriptor

When this method returns, contains the resolved HttpExceptionDescriptor, if the resolution succeeded, or null if the resolution failed.

Returns

Boolean

true if the HttpExceptionDescriptor was resolved successfully; otherwise, false.

Type Parameters

T

The type of the FaultDescriptorOptions.

Exceptions

ArgumentNullException

decorator cannot be null -or- failure cannot be null -or- context cannot be null.