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
decoratorIDecorator<T>The decorator that encapsulates the FaultDescriptorOptions.
failureExceptionThe Exception that represents the failure.
contextHttpContextThe HttpContext in which the failure occurred.
onBeforeExceptionFactoryAction<HttpExceptionDescriptor>A delegate to invoke just before the ExceptionCallback is called.
descriptorHttpExceptionDescriptorWhen this method returns, contains the resolved HttpExceptionDescriptor, if the resolution succeeded, or
nullif the resolution failed.
Returns
- bool
trueif the HttpExceptionDescriptor was resolved successfully; otherwise,false.
Type Parameters
TThe type of the FaultDescriptorOptions.
Exceptions
- ArgumentNullException
decoratorcannot be null -or-failurecannot be null -or-contextcannot be null.