public virtual object GetService(Type service)
        {
            object serviceInstance = null;

            if (typeof(IDictionaryService) == service)
            {
                serviceInstance = (IDictionaryService)this;
            }

            if (typeof(INestedContainer) == service)
            {
                if (_nestedContainer == null)
                {
                    _nestedContainer = new DesignModeNestedContainer(_component, null);
                }
                serviceInstance = _nestedContainer;
            }

            if (serviceInstance == null && _siteSpecificServices != null)
            {
                serviceInstance = _siteSpecificServices.GetService(service);
            }

            if (serviceInstance == null)
            {
                serviceInstance = _serviceProvider.GetService(service);
            }

            return(serviceInstance);
        }
Example #2
0
 internal Site(IComponent component, NestedContainer container, string name)
 {
     this.component = component;
     this.container = container;
     this.name      = name;
 }
 public Site(IComponent component, NestedContainer container, string name)
 {
     _component       = component;
     _nestedContainer = container;
     _siteName        = name;
 }