Пример #1
0
        public static HtmlTag BuildListOfRoles(BehaviorGraph behaviors, Action<BehaviorChain, HtmlTag> buildChainElement)
        {
            var tag = new HtmlTag("ul");
            var collector = new RoleCollector();
            collector.Register(behaviors);
            collector.AllRoleSets().Each(role =>
            {
                var li = tag.Add("li").Text(role.Role);
                var ul = li.Add("ul");
                role.Chains.Each(c => buildChainElement(c, ul.Add("li")));
            });

            return tag;
        }
Пример #2
0
        public static HtmlTag BuildListOfRoles(BehaviorGraph behaviors, Action <BehaviorChain, HtmlTag> buildChainElement)
        {
            var tag       = new HtmlTag("ul");
            var collector = new RoleCollector();

            collector.Register(behaviors);
            collector.AllRoleSets().Each(role =>
            {
                var li = tag.Add("li").Text(role.Role);
                var ul = li.Add("ul");
                role.Chains.Each(c => buildChainElement(c, ul.Add("li")));
            });

            return(tag);
        }