/// <summary> /// Handles the creation of domain service objects. /// </summary> public DomainService CreateDomainService(Type domainServiceType, DomainServiceContext context) { var domainService = (DomainService)IoC.GetByType(domainServiceType); if (domainService != null) { domainService.Initialize(context); } return(domainService); }
protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType) { if (controllerType == null) { return(base.GetControllerInstance(requestContext, controllerType)); } var controller = (IController)IoC.GetByType(controllerType); if (controller == null) { return(base.GetControllerInstance(requestContext, controllerType)); } return(controller); }