Class FaultDescriptorOptions
Specifies options that is related to FaultDescriptorFilter operations.
Inheritance
Namespace: Cuemon.AspNetCore.Mvc.Filters.Diagnostics
Assembly: Cuemon.AspNetCore.Mvc.dll
Syntax
public class FaultDescriptorOptions
Constructors
| Improve this DocFaultDescriptorOptions()
Initializes a new instance of the FaultDescriptorOptions class.
Declaration
public FaultDescriptorOptions()
Remarks
The following table shows the initial property values for an instance of FaultDescriptorOptions.
Property | Initial Value |
---|---|
ExceptionDescriptorHandler | null |
ExceptionDescriptorResolver | The default implementation iterates over FaultResolvers until a match is found from an System.Exception; then the associated HttpExceptionDescriptor is returned. If no match is found, a HttpExceptionDescriptor initialized to status 500 InternalServerError is returned |
ExceptionCallback | null |
IncludeRequest | false |
RequestBodyParser | null |
UseBaseException | false |
RootHelpLink | null |
Properties
| Improve this DocExceptionCallback
Gets or sets the callback delegate that is invoked when an exception has been thrown.
Declaration
public Action<Exception, HttpExceptionDescriptor> ExceptionCallback { get; set; }
Property Value
Type | Description |
---|---|
System.Action<System.Exception, HttpExceptionDescriptor> | A System.Action<T>. The default value is |
ExceptionDescriptorHandler
Gets or sets the delegate that provides a way to handle and customize an HttpExceptionDescriptor. In the default implementation, this is invoked just before the ExceptionDescriptorResult is assigned to Microsoft.AspNetCore.Mvc.Filters.ExceptionContext.Result.
Declaration
public Action<ExceptionContext, HttpExceptionDescriptor> ExceptionDescriptorHandler { get; set; }
Property Value
Type | Description |
---|---|
System.Action<Microsoft.AspNetCore.Mvc.Filters.ExceptionContext, HttpExceptionDescriptor> | The delegate that provides a way to handle and customize an HttpExceptionDescriptor. |
ExceptionDescriptorResolver
Gets or sets the function delegate that will resolve a HttpExceptionDescriptor from the specified System.Exception.
Declaration
public Func<Exception, HttpExceptionDescriptor> ExceptionDescriptorResolver { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.Exception, HttpExceptionDescriptor> | The function delegate that will resolve a HttpExceptionDescriptor from the specified System.Exception. |
FaultResolvers
Gets a collection of FaultResolver that can ease the usage of ExceptionDescriptorResolver.
Declaration
public IList<FaultResolver> FaultResolvers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<FaultResolver> | The collection of FaultResolver. |
HasRootHelpLink
Gets a value indicating whether this instance is initialized with RootHelpLink.
Declaration
public bool HasRootHelpLink { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IncludeRequest
Gets or sets a value indicating whether the request that caused the exception should be included as evidence.
Declaration
public bool IncludeRequest { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MarkExceptionHandled
Gets or sets a value indicating whether to mark ASP.NET Core MVC Microsoft.AspNetCore.Mvc.Filters.ExceptionContext.ExceptionHandled to true
.
Declaration
public bool MarkExceptionHandled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
RequestBodyParser
Gets or sets the function delegate that, when IncludeRequest is true
, will determines the string result of a HTTP request body.
Declaration
public Func<Stream, string> RequestBodyParser { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.IO.Stream, System.String> | The function delegate that determines the string result of a HTTP request body. |
RootHelpLink
Gets or sets the root link to a help file associated with an API.
Declaration
public Uri RootHelpLink { get; set; }
Property Value
Type | Description |
---|---|
System.Uri | The root link to a help file associated with an API. |
UseBaseException
Gets or sets a value indicating whether to expose only the base exception that caused the faulted operation.
Declaration
public bool UseBaseException { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|