예제 #1
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);

            var 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);
            }
        }
예제 #2
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);
        }