public object GetService(Type serviceType)
        {
            if (typeof(XmlSiteMapController).Equals(serviceType))
            {
                var xmlSiteMapResultFactoryContainer = new XmlSiteMapResultFactoryContainer(this.settings);
                return(new XmlSiteMapController(xmlSiteMapResultFactoryContainer.ResolveXmlSiteMapResultFactory()));
            }

            return(innerDependencyResolver.GetService(serviceType));
        }
        public IEnumerable<object> GetServices(Type serviceType)
        {
            if (typeof(XmlSiteMapController).Equals(serviceType))
            {
                var xmlSiteMapResultFactoryContainer = new XmlSiteMapResultFactoryContainer(this.settings);
                return new List<object>() { new XmlSiteMapController(xmlSiteMapResultFactoryContainer.ResolveXmlSiteMapResultFactory()) };
            }

            return innerDependencyResolver.GetServices(serviceType);
        }
        public object GetService(Type serviceType)
        {
            if (typeof(XmlSiteMapController).Equals(serviceType))
            {
                var xmlSiteMapResultFactoryContainer = new XmlSiteMapResultFactoryContainer(this.settings);
                return new XmlSiteMapController(xmlSiteMapResultFactoryContainer.ResolveXmlSiteMapResultFactory());
            }

            return innerDependencyResolver.GetService(serviceType);
        }
        public IEnumerable <object> GetServices(Type serviceType)
        {
            if (typeof(XmlSiteMapController).Equals(serviceType))
            {
                var xmlSiteMapResultFactoryContainer = new XmlSiteMapResultFactoryContainer(this.settings);
                return(new List <object>()
                {
                    new XmlSiteMapController(xmlSiteMapResultFactoryContainer.ResolveXmlSiteMapResultFactory())
                });
            }

            return(innerDependencyResolver.GetServices(serviceType));
        }
 protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
 {
     var xmlSiteMapResultFactoryContainer = new XmlSiteMapResultFactoryContainer(this.settings);
     return new XmlSiteMapController(xmlSiteMapResultFactoryContainer.ResolveXmlSiteMapResultFactory());
 }
Exemplo n.º 6
0
        protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
        {
            var xmlSiteMapResultFactoryContainer = new XmlSiteMapResultFactoryContainer(this.settings);

            return(new XmlSiteMapController(xmlSiteMapResultFactoryContainer.ResolveXmlSiteMapResultFactory()));
        }