DefaultControllerFactory.CreateController(RequestContext, String) Method

Definition

Creates the specified controller by using the specified request context.

public virtual System.Web.Mvc.IController CreateController (System.Web.Routing.RequestContext requestContext, string controllerName);
abstract member CreateController : System.Web.Routing.RequestContext * string -> System.Web.Mvc.IController
override this.CreateController : System.Web.Routing.RequestContext * string -> System.Web.Mvc.IController
Public Overridable Function CreateController (requestContext As RequestContext, controllerName As String) As IController

Parameters

requestContext
RequestContext

The context of the HTTP request, which includes the HTTP context and route data.

controllerName
String

The name of the controller.

Returns

The controller.

Implements

Exceptions

The requestContext parameter is null.

The controllerName parameter is null or empty.

Applies to