Class ServerTimingMiddlewareExtensions
The Microsoft.AspNetCore.Builder.IApplicationBuilder extensions for adding Server Timing API middleware to pipeline.
Inheritance
Inherited Members
Namespace: Microsoft.AspNetCore.Builder
Assembly: Lib.AspNetCore.ServerTiming.dll
Syntax
public static class ServerTimingMiddlewareExtensions
Methods
UseServerTiming(IApplicationBuilder)
Adds a ServerTimingMiddleware to application pipeline.
Declaration
public static IApplicationBuilder UseServerTiming(this IApplicationBuilder app)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | The Microsoft.AspNetCore.Builder.IApplicationBuilder passed to Configure method. |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | The original app parameter |
UseServerTiming(IApplicationBuilder, ServerTimingOptions)
Adds a ServerTimingMiddleware to application pipeline.
Declaration
public static IApplicationBuilder UseServerTiming(this IApplicationBuilder app, ServerTimingOptions options)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | The Microsoft.AspNetCore.Builder.IApplicationBuilder passed to Configure method. |
ServerTimingOptions | options | The ServerTimingOptions to configure the middleware. |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | The original app parameter |
UseServerTiming(IApplicationBuilder, ICollection<String>)
Adds a ServerTimingMiddleware to application pipeline.
Declaration
[Obsolete("This method is obsolete and will be removed in future, use the version which takes ServerTimingOptions as a parameter.")]
public static IApplicationBuilder UseServerTiming(this IApplicationBuilder app, ICollection<string> timingAllowOrigins)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | The Microsoft.AspNetCore.Builder.IApplicationBuilder passed to Configure method. |
System.Collections.Generic.ICollection<System.String> | timingAllowOrigins | The collection of origins that are allowed to see values from timing APIs. |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | The original app parameter |
UseServerTiming(IApplicationBuilder, String[])
Adds a ServerTimingMiddleware to application pipeline.
Declaration
[Obsolete("This method is obsolete and will be removed in future, use the version which takes ServerTimingOptions as a parameter.")]
public static IApplicationBuilder UseServerTiming(this IApplicationBuilder app, params string[] timingAllowOrigins)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | The Microsoft.AspNetCore.Builder.IApplicationBuilder passed to Configure method. |
System.String[] | timingAllowOrigins | The origins that are allowed to see values from timing APIs. |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | The original app parameter |