Beispiel #1
0
 private static XElement RenderElementFragment(
     EventBean eventBean, NestedGetterPair nestedProp)
 {
     return(new XElement(
                nestedProp.Name,
                RenderRecursive(eventBean, nestedProp.Metadata)
                .Cast <object>()
                .ToArray()));
 }
Beispiel #2
0
        private static XElement RenderAttributeInner(EventBean nestedEventBean, NestedGetterPair nestedProp)
        {
            var attributes = RenderAttributes(
                nestedEventBean, nestedProp.Metadata).Cast <object>();
            var attributeElements = RenderAttributeElements(
                nestedEventBean, nestedProp.Metadata).Cast <object>();
            var elementParts = attributes
                               .Concat(attributeElements)
                               .ToArray();

            return(new XElement(
                       nestedProp.Name,
                       elementParts));
        }
Beispiel #3
0
        private static void RenderElementFragment(EventBean eventBean, StringBuilder buf, int level,
                                                  NestedGetterPair nestedProp, RendererMetaOptions rendererMetaOptions)
        {
            Ident(buf, level);
            buf.Append('<');
            buf.Append(nestedProp.Name);
            buf.Append('>');
            buf.Append(NEWLINE);

            RecursiveRender(eventBean, buf, level + 1, nestedProp.Metadata, rendererMetaOptions);

            Ident(buf, level);
            buf.Append("</");
            buf.Append(nestedProp.Name);
            buf.Append('>');
            buf.Append(NEWLINE);
        }
Beispiel #4
0
        private void RenderAttInner(StringBuilder buf, int level, EventBean nestedEventBean, NestedGetterPair nestedProp)
        {
            Ident(buf, level);
            buf.Append('<');
            buf.Append(nestedProp.Name);

            RenderAttributes(nestedEventBean, buf, nestedProp.Metadata);

            String inner = RenderAttElements(nestedEventBean, level + 1, nestedProp.Metadata);

            if ((inner == null) || (inner.Trim().Length == 0))
            {
                buf.Append("/>");
                buf.Append(NEWLINE);
            }
            else
            {
                buf.Append(">");
                buf.Append(NEWLINE);
                buf.Append(inner);

                Ident(buf, level);
                buf.Append("</");
                buf.Append(nestedProp.Name);
                buf.Append('>');
                buf.Append(NEWLINE);
            }
        }