Class UmbracoPipelineFilter
Used to modify the Microsoft.AspNetCore.Builder.IApplicationBuilder pipeline before and after Umbraco registers its middlewares.
Inheritance
Namespace: Umbraco.Cms.Web.Common.ApplicationBuilder
Assembly: Umbraco.Web.Common.dll
Syntax
public class UmbracoPipelineFilter : IUmbracoPipelineFilter
Remarks
Mainly used for package developers.
Constructors
View SourceUmbracoPipelineFilter(String)
Initializes a new instance of the UmbracoPipelineFilter class.
Declaration
public UmbracoPipelineFilter(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
UmbracoPipelineFilter(String, Nullable<Action<IApplicationBuilder>>, Nullable<Action<IApplicationBuilder>>, Nullable<Action<IApplicationBuilder>>, Nullable<Action<IApplicationBuilder>>, Nullable<Action<IApplicationBuilder>>)
Initializes a new instance of the UmbracoPipelineFilter class.
Declaration
public UmbracoPipelineFilter(string name, Action<IApplicationBuilder>? prePipeline = null, Action<IApplicationBuilder>? preRouting = null, Action<IApplicationBuilder>? postRouting = null, Action<IApplicationBuilder>? postPipeline = null, Action<IApplicationBuilder>? endpoints = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | prePipeline | The pre pipeline callback. |
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | preRouting | The pre routing callback. |
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | postRouting | The post routing callback. |
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | postPipeline | The post pipeline callback. |
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | endpoints | The endpoints callback. |
Properties
View SourceEndpoints
Gets or sets the endpoints callback.
Declaration
public Action<IApplicationBuilder>? Endpoints { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | The endpoints callback. |
Name
The name of the filter.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The name. |
Remarks
This can be used by developers to see what is registered and if anything should be re-ordered, removed, etc...
PostPipeline
Gets or sets the post pipeline callback.
Declaration
public Action<IApplicationBuilder>? PostPipeline { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | The post pipeline callback. |
PostRouting
Gets or sets the post routing callback.
Declaration
public Action<IApplicationBuilder>? PostRouting { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | The post routing callback. |
PrePipeline
Gets or sets the pre pipeline callback.
Declaration
public Action<IApplicationBuilder>? PrePipeline { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | The pre pipeline callback. |
PreRouting
Gets or sets the pre routing.
Declaration
public Action<IApplicationBuilder>? PreRouting { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>> | The pre routing. |
Methods
View SourceOnEndpoints(IApplicationBuilder)
Executes after the middlewares are registered and just before any Umbraco endpoints are declared.
Declaration
public void OnEndpoints(IApplicationBuilder app)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | The application. |
OnPostPipeline(IApplicationBuilder)
Executes after core Umbraco middlewares are registered and before any endpoints are declared.
Declaration
public void OnPostPipeline(IApplicationBuilder app)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | The application. |
OnPostRouting(IApplicationBuilder)
Executes after the routing middleware is registered and just before the authentication and authorization middlewares are registered. This can be used to add CORS policies.
Declaration
public void OnPostRouting(IApplicationBuilder app)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | The application. |
OnPrePipeline(IApplicationBuilder)
Executes before any default Umbraco middlewares are registered.
Declaration
public void OnPrePipeline(IApplicationBuilder app)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | The application. |
OnPreRouting(IApplicationBuilder)
Executes after static files middlewares are registered and just before the routing middleware is registered.
Declaration
public void OnPreRouting(IApplicationBuilder app)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Builder.IApplicationBuilder | app | The application. |