UseExtensions UseExtensions Class

Extension methods for adding middleware.

Syntax

Declaration

public static class UseExtensionsPublic Module UseExtensions

Inheritance Hierarchy

  • System.Object
    System.Object
  • UseExtensions
    UseExtensions

Inherited Members

ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Methods summary

Adds a middleware delagate defined in-line to the application's request pipeline.

Methods

  • Use(IApplicationBuilder, Func<HttpContext, Func<Task>, Task>)
    Use(IApplicationBuilder, Func(Of HttpContext, Func(Of Task), Task))
    Adds a middleware delagate defined in-line to the application's request pipeline.
    public static IApplicationBuilder Use(this IApplicationBuilder app, Func<HttpContext, Func<Task>, Task> middleware)<ExtensionAttribute>
    Public Shared Function Use(app As IApplicationBuilder, middleware As Func(Of HttpContext, Func(Of Task), Task)) As IApplicationBuilder

    Parameters

    • app
      The IApplicationBuilder instance.
    • middleware
      System.Func<T1, T2, TResult><HttpContext, System.Func<TResult><System.Threading.Tasks.Task>, System.Threading.Tasks.Task>
      System.Func<T1, T2, TResult>(Of HttpContext, System.Func<TResult>(Of System.Threading.Tasks.Task), System.Threading.Tasks.Task)
      A function that handles the request or calls the given next function.

    Returns

Details

Assembly

Microsoft.AspNetCore.Http.Abstractions.dll