IApplicationBuilder Interface¶
Defines a class that provides the mechanisms to configure an application’s request pipeline.
- Namespace
Microsoft.AspNetCore.Builder
- Assemblies
- Microsoft.AspNetCore.Http.Abstractions
Syntax¶
public interface IApplicationBuilder
-
interface
Microsoft.AspNetCore.Builder.
IApplicationBuilder
Properties¶
-
Microsoft.AspNetCore.Builder.IApplicationBuilder.
ApplicationServices
¶ Gets or sets the
System.IServiceProvider
that provides access to the application’s service container.Return type: System.IServiceProvider IServiceProvider ApplicationServices { get; set; }
-
Microsoft.AspNetCore.Builder.IApplicationBuilder.
Properties
¶ Gets a key/value collection that can be used to share data between middleware.
Return type: System.Collections.Generic.IDictionary<System.String> IDictionary<string, object> Properties { get; }
-
Microsoft.AspNetCore.Builder.IApplicationBuilder.
ServerFeatures
¶ Gets the set of HTTP features the application’s server provides.
Return type: Microsoft.AspNetCore.Http.Features.IFeatureCollection IFeatureCollection ServerFeatures { get; }
-
Methods¶
-
Build
()¶ Builds the delegate used by this application to process HTTP requests.
Return type: Microsoft.AspNetCore.Http.RequestDelegate Returns: The request handling delegate. RequestDelegate Build()
-
New
()¶ Creates a new
Microsoft.AspNetCore.Builder.IApplicationBuilder
that shares theMicrosoft.AspNetCore.Builder.IApplicationBuilder.Properties
of thisMicrosoft.AspNetCore.Builder.IApplicationBuilder
.Return type: Microsoft.AspNetCore.Builder.IApplicationBuilder Returns: The new Microsoft.AspNetCore.Builder.IApplicationBuilder
.IApplicationBuilder New()
-
Use
(System.Func<Microsoft.AspNetCore.Http.RequestDelegate, Microsoft.AspNetCore.Http.RequestDelegate>)¶ Adds a middleware delegate to the application’s request pipeline.
Arguments: middleware (System.Func<Microsoft.AspNetCore.Http.RequestDelegate>) – The middleware delgate. Return type: Microsoft.AspNetCore.Builder.IApplicationBuilder Returns: The Microsoft.AspNetCore.Builder.IApplicationBuilder
.IApplicationBuilder Use(Func<RequestDelegate, RequestDelegate> middleware)
-