public override IRuleMacro GetTreeMacro(XElement element, string name, UrlString parameters)
        {
            var item = RuleHelper.GetItemFromParameters("dependency", element, parameters);

            Assert.IsNotNull(item, "The parameter 'dependency' was not specified or could not be resolved");

            var selectorConfig             = this.MacroConfiguration.GetMacroSelectorConfig(item);
            IMacroSelectorForItem selector = null;

            if (selectorConfig != null)
            {
                selector = selectorConfig.GetTreeSelector(item);
            }
            if (selector == null)
            {
                selector = this.MacroConfiguration.DefaultTreeSelector;
            }
            if (selector == null)
            {
                return(null);
            }
            var macro = selector.GetMacro(item);

            return(macro);
        }
        protected virtual AdaptiveTreeMacroSettingsItem GetAdaptiveTreeMacroSettingsItem(XElement element, string name, UrlString parameters, string value)
        {
            Item item = null;

            if (!string.IsNullOrEmpty(this.SettingsItemId) && ID.IsID(this.SettingsItemId))
            {
                var id = new ID(this.SettingsItemId);
                item = Sitecore.Client.ContentDatabase.GetItem(id);
            }
            if (item == null)
            {
                item = RuleHelper.GetItemFromParameters("settings", element, parameters);
            }
            AdaptiveTreeMacroSettingsItem item2 = item;

            return(item2);
        }