다음을 통해 공유


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을 할당할 수 없습니다.

의 instance controllerType 만들 수 없습니다.

적용 대상