Show / Hide Table of Contents

    Class UnhandledExceptionBehavior<TRequest, TResponse>

    For any exception that thrown in the request pipeline, except DomainExceptions, by adding this behavior, it will log the exception.

    Inheritance
    object
    UnhandledExceptionBehavior<TRequest, TResponse>
    Implements
    IPipelineBehavior<TRequest, TResponse>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Code.Library.Application.Behaviors
    Assembly: Code.Library.Application.dll
    Syntax
    public class UnhandledExceptionBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : IRequest<TResponse>
    Type Parameters
    Name Description
    TRequest
    TResponse
    Remarks

    Credits: https://github.com/jasontaylordev/CleanArchitecture

    Constructors

    | Improve this Doc View Source

    UnhandledExceptionBehavior(ILogger<TRequest>)

    For any exception that thrown in the request pipeline, except DomainExceptions, by adding this behavior, it will log the exception.

    Declaration
    public UnhandledExceptionBehavior(ILogger<TRequest> logger)
    Parameters
    Type Name Description
    ILogger<TRequest> logger
    Remarks

    Credits: https://github.com/jasontaylordev/CleanArchitecture

    Methods

    | Improve this Doc View Source

    Handle(TRequest, CancellationToken, RequestHandlerDelegate<TResponse>)

    For any exception that thrown in the request pipeline, except DomainExceptions, by adding this behavior, it will log the exception.

    Declaration
    public Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate<TResponse> next)
    Parameters
    Type Name Description
    TRequest request
    CancellationToken cancellationToken
    RequestHandlerDelegate<TResponse> next
    Returns
    Type Description
    Task<TResponse>
    Remarks

    Credits: https://github.com/jasontaylordev/CleanArchitecture

    Implements

    MediatR.IPipelineBehavior<TRequest, TResponse>

    Extension Methods

    SerializationHelper.SerializeObject<T>(T)
    SerializationHelper.SerializeObjectUsingBinaryFormatter<T>(T)
    SerializationHelper.SerializeToXML<T>(T)
    GenericTypeExtensions.GetGenericTypeName(object)
    • Improve this Doc
    • View Source
    Back to top Generated by Abhith Rajan using DocFX