AttributeRoutingConvention Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AttributeRoutingConvention(String, IEnumerable<HttpControllerDescriptor>) |
Initializes a new instance of the AttributeRoutingConvention class. |
AttributeRoutingConvention(String, HttpConfiguration) |
Initializes a new instance of the AttributeRoutingConvention class. |
AttributeRoutingConvention(String, IEnumerable<HttpControllerDescriptor>, IODataPathTemplateHandler) |
Initializes a new instance of the AttributeRoutingConvention class. |
AttributeRoutingConvention(String, IServiceProvider, IODataPathTemplateHandler) |
Initializes a new instance of the AttributeRoutingConvention class. |
AttributeRoutingConvention(String, HttpConfiguration, IODataPathTemplateHandler) |
Initializes a new instance of the AttributeRoutingConvention class. |
AttributeRoutingConvention(String, IEnumerable<HttpControllerDescriptor>)
Initializes a new instance of the AttributeRoutingConvention class.
public AttributeRoutingConvention (string routeName, System.Collections.Generic.IEnumerable<System.Web.Http.Controllers.HttpControllerDescriptor> controllers);
new Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention : string * seq<System.Web.Http.Controllers.HttpControllerDescriptor> -> Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention
Public Sub New (routeName As String, controllers As IEnumerable(Of HttpControllerDescriptor))
Parameters
- routeName
- String
The name of the route.
- controllers
- IEnumerable<System.Web.Http.Controllers.HttpControllerDescriptor>
The collection of controllers to search for a match.
Remarks
This signature uses types that are AspNet-specific and is only used for unit tests.
Applies to
AttributeRoutingConvention(String, HttpConfiguration)
Initializes a new instance of the AttributeRoutingConvention class.
public AttributeRoutingConvention (string routeName, System.Web.Http.HttpConfiguration configuration);
new Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention : string * System.Web.Http.HttpConfiguration -> Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention
Public Sub New (routeName As String, configuration As HttpConfiguration)
Parameters
- routeName
- String
The name of the route.
- configuration
- System.Web.Http.HttpConfiguration
The System.Web.Http.HttpConfiguration to use for figuring out all the controllers to look for a match.
Remarks
This signature uses types that are AspNet-specific.
Applies to
AttributeRoutingConvention(String, IEnumerable<HttpControllerDescriptor>, IODataPathTemplateHandler)
Initializes a new instance of the AttributeRoutingConvention class.
public AttributeRoutingConvention (string routeName, System.Collections.Generic.IEnumerable<System.Web.Http.Controllers.HttpControllerDescriptor> controllers, Microsoft.AspNet.OData.Routing.IODataPathTemplateHandler pathTemplateHandler);
new Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention : string * seq<System.Web.Http.Controllers.HttpControllerDescriptor> * Microsoft.AspNet.OData.Routing.IODataPathTemplateHandler -> Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention
Public Sub New (routeName As String, controllers As IEnumerable(Of HttpControllerDescriptor), pathTemplateHandler As IODataPathTemplateHandler)
Parameters
- routeName
- String
The name of the route.
- controllers
- IEnumerable<System.Web.Http.Controllers.HttpControllerDescriptor>
The collection of controllers to search for a match.
- pathTemplateHandler
- IODataPathTemplateHandler
The path template handler to be used for parsing the path templates.
Remarks
This signature uses types that are AspNet-specific and is only used for unit tests.
Applies to
AttributeRoutingConvention(String, IServiceProvider, IODataPathTemplateHandler)
Initializes a new instance of the AttributeRoutingConvention class.
public AttributeRoutingConvention (string routeName, IServiceProvider serviceProvider, Microsoft.AspNet.OData.Routing.IODataPathTemplateHandler pathTemplateHandler = default);
new Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention : string * IServiceProvider * Microsoft.AspNet.OData.Routing.IODataPathTemplateHandler -> Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention
Public Sub New (routeName As String, serviceProvider As IServiceProvider, Optional pathTemplateHandler As IODataPathTemplateHandler = Nothing)
Parameters
- routeName
- String
The name of the route.
- serviceProvider
- IServiceProvider
The IServiceProvider to use for figuring out all the controllers to look for a match.
- pathTemplateHandler
- IODataPathTemplateHandler
The path template handler to be used for parsing the path templates.
Remarks
While this function does not use types that are AspNetCore-specific, the functionality is due to the way assembly resolution is done in AspNet vs AspnetCore.
Applies to
AttributeRoutingConvention(String, HttpConfiguration, IODataPathTemplateHandler)
Initializes a new instance of the AttributeRoutingConvention class.
public AttributeRoutingConvention (string routeName, System.Web.Http.HttpConfiguration configuration, Microsoft.AspNet.OData.Routing.IODataPathTemplateHandler pathTemplateHandler);
new Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention : string * System.Web.Http.HttpConfiguration * Microsoft.AspNet.OData.Routing.IODataPathTemplateHandler -> Microsoft.AspNet.OData.Routing.Conventions.AttributeRoutingConvention
Public Sub New (routeName As String, configuration As HttpConfiguration, pathTemplateHandler As IODataPathTemplateHandler)
Parameters
- routeName
- String
The name of the route.
- configuration
- System.Web.Http.HttpConfiguration
The System.Web.Http.HttpConfiguration to use for figuring out all the controllers to look for a match.
- pathTemplateHandler
- IODataPathTemplateHandler
The path template handler to be used for parsing the path templates.
Remarks
This signature uses types that are AspNet-specific.