IRegionDefinition IRegionDefinition.Html(string textAssetName, string defaultHtml)
        {
            var htmlComponent = new HtmlComponent(_componentDependenciesFactory);

            htmlComponent.Html(textAssetName, defaultHtml);
            _region.Content = htmlComponent;

            return(this);
        }
示例#2
0
        ILayoutDefinition ILayoutDefinition.Html(string zoneName, string textAssetName, string defaultHtml)
        {
            var htmlComponent = new HtmlComponent(_componentDependenciesFactory);

            htmlComponent.Html(textAssetName, defaultHtml);
            _regionComponents[zoneName] = htmlComponent;

            return(this);
        }
        IPageDefinition IPageDefinition.RegionHtml(string regionName, string textAssetName, string defaultHtml)
        {
            if (string.IsNullOrEmpty(regionName))
            {
                throw new PageBuilderException("You must provide a region name when configuring page regions");
            }

            var component = new HtmlComponent(_componentDependenciesFactory);

            component.Html(textAssetName, defaultHtml);

            _page.PopulateRegion(regionName, component);

            return(this);
        }