Пример #1
0
        private void YieldBody(ITag tag)
        {
            var body = tag.GetType().GetProperty("Body");

            if (body == null)
            {
                return;
            }
            if (!typeof(ITagAttribute).IsAssignableFrom(body.PropertyType))
            {
                return;
            }
            var value = body.GetValue(tag) as TemplateAttribute;

            if (value == null)
            {
                return;
            }
            var children = new List <INode>();

            foreach (var templatePart in value.TemplateParsed)
            {
                children.Add(Harvest(templatePart));
            }
            Raw = RawStringHelper.Build(children);
        }
Пример #2
0
 public TagAttributeNode(string name, params INode[] nodes)
 {
     Name  = name;
     Nodes = nodes;
     Raw   = RawStringHelper.Build(nodes);
 }