Show / Hide Table of Contents

    Class FaultDescriptorOptions

    Specifies options that is related to FaultDescriptorFilter operations.

    Inheritance
    System.Object
    FaultDescriptorOptions
    Namespace: Cuemon.AspNetCore.Mvc.Filters.Diagnostics
    Assembly: Cuemon.AspNetCore.Mvc.dll
    Syntax
    public class FaultDescriptorOptions

    Constructors

    | Improve this Doc

    FaultDescriptorOptions()

    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.

    PropertyInitial Value
    ExceptionDescriptorHandlernull
    ExceptionDescriptorResolverThe 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
    ExceptionCallbacknull
    IncludeRequestfalse
    RequestBodyParsernull
    UseBaseExceptionfalse
    RootHelpLinknull

    Properties

    | Improve this Doc

    ExceptionCallback

    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 null.

    | Improve this Doc

    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.

    | Improve this Doc

    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.

    | Improve this Doc

    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.

    | Improve this Doc

    HasRootHelpLink

    Gets a value indicating whether this instance is initialized with RootHelpLink.

    Declaration
    public bool HasRootHelpLink { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is initialized with RootHelpLink; otherwise, false.

    | Improve this Doc

    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

    true if the request that caused the exception should be included as evidence; otherwise, false.

    | Improve this Doc

    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

    true if Microsoft.AspNetCore.Mvc.Filters.ExceptionContext.ExceptionHandled should be set; otherwise, false.

    | Improve this Doc

    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.

    | Improve this Doc

    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.

    | Improve this Doc

    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

    true if only the base exception is exposed; otherwise, false, to include the entire exception tree.

    Extension Methods

    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, DateTime, Action<TimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, DateTime>, Action<TimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Byte[], Action<ContentBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, Byte[]>, Action<ContentBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, DateTime, Byte[], Action<ContentTimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, DateTime>, Func<T, Byte[]>, Action<ContentTimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, DateTime, Func<T, Byte[]>, Action<ContentTimeBasedOptions>)
    CacheableObjectResultExtensions.ToCacheableObjectResult<T>(T, Func<T, DateTime>, Byte[], Action<ContentTimeBasedOptions>)

    See Also

    FaultDescriptorFilter
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX