Show / Hide Table of Contents

    Class RequestLoggingReceiveInterceptor

    Logs a request to the configured logger, indicating whether it was successful or not.

    Inheritance
    System.Object
    RequestLoggingReceiveInterceptor
    Implements
    IReceiveInterceptor
    IAsyncInterceptor
    Namespace: Copper.Diagnostics.Common.Interceptors
    Assembly: Copper.Diagnostics.Common.dll
    Syntax
    public class RequestLoggingReceiveInterceptor : IReceiveInterceptor, IAsyncInterceptor

    Constructors

    View Source

    RequestLoggingReceiveInterceptor(ILogger<RequestLoggingReceiveInterceptor>)

    Initializes a new instance of the RequestLoggingReceiveInterceptor class.

    Declaration
    public RequestLoggingReceiveInterceptor(ILogger<RequestLoggingReceiveInterceptor> logger)
    Parameters
    Type Name Description
    ILogger<RequestLoggingReceiveInterceptor> logger

    The logger.

    Methods

    View Source

    InterceptAsynchronous(IInvocation)

    Intercepts an asynchronous method invocation with return type of System.Threading.Tasks.Task.

    Declaration
    public void InterceptAsynchronous(IInvocation invocation)
    Parameters
    Type Name Description
    IInvocation invocation

    The method invocation.

    View Source

    InterceptAsynchronous<TResult>(IInvocation)

    Intercepts an asynchronous method invocation with return type of System.Threading.Tasks.Task<TResult>.

    Declaration
    public void InterceptAsynchronous<TResult>(IInvocation invocation)
    Parameters
    Type Name Description
    IInvocation invocation

    The method invocation.

    Type Parameters
    Name Description
    TResult

    The type of the System.Threading.Tasks.Task<TResult> result.

    View Source

    InterceptSynchronous(IInvocation)

    Intercepts a synchronous method invocation.

    Declaration
    public void InterceptSynchronous(IInvocation invocation)
    Parameters
    Type Name Description
    IInvocation invocation

    The method invocation.

    Implements

    IReceiveInterceptor
    IAsyncInterceptor
    • View Source
    Back to top Generated by DocFX