DefaultControllerFactory.GetControllerInstance(RequestContext, Type) メソッド

定義

指定した要求コンテキストおよびコントローラーの種類のコントローラー インスタンスを取得します。

protected internal virtual System.Web.Mvc.IController GetControllerInstance (System.Web.Routing.RequestContext requestContext, Type controllerType);
abstract member GetControllerInstance : System.Web.Routing.RequestContext * Type -> System.Web.Mvc.IController
override this.GetControllerInstance : System.Web.Routing.RequestContext * Type -> System.Web.Mvc.IController
Protected Friend Overridable Function GetControllerInstance (requestContext As RequestContext, controllerType As Type) As IController

パラメーター

requestContext
RequestContext

HTTP コンテンツ、ルート データなどを含む HTTP 要求のコンテキスト。

controllerType
Type

コントローラーの種類。

戻り値

コントローラー インスタンス。

例外

controllerType が null です。

controllerType を割り当てることができません。

controllerType インスタンスを作成できません。

適用対象