Show / Hide Table of Contents

Class ServerTimingMiddleware

Middleware providing support for Server Timing API.

Inheritance
System.Object
ServerTimingMiddleware
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lib.AspNetCore.ServerTiming
Assembly: Lib.AspNetCore.ServerTiming.dll
Syntax
public class ServerTimingMiddleware

Constructors

ServerTimingMiddleware(RequestDelegate)

Instantiates a new ServerTimingMiddleware.

Declaration
public ServerTimingMiddleware(RequestDelegate next)
Parameters
Type Name Description
Microsoft.AspNetCore.Http.RequestDelegate next

The next middleware in the pipeline.

ServerTimingMiddleware(RequestDelegate, ServerTimingOptions)

Instantiates a new ServerTimingMiddleware.

Declaration
public ServerTimingMiddleware(RequestDelegate next, ServerTimingOptions options)
Parameters
Type Name Description
Microsoft.AspNetCore.Http.RequestDelegate next

The next middleware in the pipeline.

ServerTimingOptions options

Server timing configuration options

ServerTimingMiddleware(RequestDelegate, TimingAllowOriginHeaderValue)

Instantiates a new ServerTimingMiddleware.

Declaration
public ServerTimingMiddleware(RequestDelegate next, TimingAllowOriginHeaderValue timingAllowOrigin)
Parameters
Type Name Description
Microsoft.AspNetCore.Http.RequestDelegate next

The next middleware in the pipeline.

TimingAllowOriginHeaderValue timingAllowOrigin

The Timing-Allow-Origin header value.

ServerTimingMiddleware(RequestDelegate, ICollection<String>)

Instantiates a new ServerTimingMiddleware.

Declaration
public ServerTimingMiddleware(RequestDelegate next, ICollection<string> timingAllowOrigins)
Parameters
Type Name Description
Microsoft.AspNetCore.Http.RequestDelegate next

The next middleware in the pipeline.

System.Collections.Generic.ICollection<System.String> timingAllowOrigins

The collection of origins that are allowed to see values from timing APIs.

Methods

Invoke(HttpContext, IServerTiming)

Process an individual request.

Declaration
public Task Invoke(HttpContext context, IServerTiming serverTiming)
Parameters
Type Name Description
Microsoft.AspNetCore.Http.HttpContext context

The context.

IServerTiming serverTiming

The instance of IServerTiming for current requet.

Returns
Type Description
System.Threading.Tasks.Task

The task object representing the asynchronous operation.

Back to top Copyright © 2017 - 2023 Tomasz Pęczek