AttributeRoutingConvention.ShouldMapController Method
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
ShouldMapController(ControllerActionDescriptor) |
Specifies whether OData route attributes on this controller should be mapped. This method will execute before the derived type's instance constructor executes. Derived types must be aware of this and should plan accordingly. For example, the logic in ShouldMapController() should be simple enough so as not to depend on the "this" pointer referencing a fully constructed object. |
ShouldMapController(HttpControllerDescriptor) |
Specifies whether OData route attributes on this controller should be mapped. This method will execute before the derived type's instance constructor executes. Derived types must be aware of this and should plan accordingly. For example, the logic in ShouldMapController() should be simple enough so as not to depend on the "this" pointer referencing a fully constructed object. |
ShouldMapController(ControllerActionDescriptor)
Specifies whether OData route attributes on this controller should be mapped. This method will execute before the derived type's instance constructor executes. Derived types must be aware of this and should plan accordingly. For example, the logic in ShouldMapController() should be simple enough so as not to depend on the "this" pointer referencing a fully constructed object.
public virtual bool ShouldMapController (Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor controllerAction);
abstract member ShouldMapController : Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor -> bool
override this.ShouldMapController : Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor -> bool
Public Overridable Function ShouldMapController (controllerAction As ControllerActionDescriptor) As Boolean
Parameters
- controllerAction
- ControllerActionDescriptor
The controller action.
Returns
true
if this controller should be included in the map; false
otherwise.
Remarks
This signature uses types that are AspNetCore-specific.
Applies to
ShouldMapController(HttpControllerDescriptor)
Specifies whether OData route attributes on this controller should be mapped. This method will execute before the derived type's instance constructor executes. Derived types must be aware of this and should plan accordingly. For example, the logic in ShouldMapController() should be simple enough so as not to depend on the "this" pointer referencing a fully constructed object.
public virtual bool ShouldMapController (System.Web.Http.Controllers.HttpControllerDescriptor controller);
abstract member ShouldMapController : System.Web.Http.Controllers.HttpControllerDescriptor -> bool
override this.ShouldMapController : System.Web.Http.Controllers.HttpControllerDescriptor -> bool
Public Overridable Function ShouldMapController (controller As HttpControllerDescriptor) As Boolean
Parameters
- controller
- System.Web.Http.Controllers.HttpControllerDescriptor
The controller.
Returns
true
if this controller should be included in the map; false
otherwise.
Remarks
This signature uses types that are AspNet-specific.