Show / Hide Table of Contents

    Class Middleware<T>

    Provides a base-class for middleware implementation in ASP.NET Core with one dependency injected parameters.

    Inheritance
    System.Object
    MiddlewareCore
    Middleware<T>
    Inherited Members
    MiddlewareCore.Next
    Namespace: Cuemon.AspNetCore
    Assembly: Cuemon.AspNetCore.dll
    Syntax
    public abstract class Middleware<T> : MiddlewareCore
    Type Parameters
    Name Description
    T

    The type of the dependency injected parameter of InvokeAsync(HttpContext, T).

    Constructors

    | Improve this Doc

    Middleware(RequestDelegate)

    Initializes a new instance of the Middleware class.

    Declaration
    protected Middleware(RequestDelegate next)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.RequestDelegate next

    The delegate of the request pipeline to invoke.

    Methods

    | Improve this Doc

    InvokeAsync(HttpContext, T)

    Executes the Middleware<T>.

    Declaration
    public abstract Task InvokeAsync(HttpContext context, T di)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.HttpContext context

    The context of the current request.

    T di

    The dependency injected parameter of InvokeAsync(HttpContext, T).

    Returns
    Type Description
    System.Threading.Tasks.Task

    A task that represents the execution of this middleware.

    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

    ConfigurableMiddleware<T, TOptions>
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX