public static void WriteSimpleTypeStrucure(this MamlWriter writer,
                                                   Context context, SimpleTypeStructureNode root)
        {
            if (root == null || root.Children.Count == 0)
            {
                return;
            }

            if (root.Children.Count == 1)
            {
                var node        = root.Children[0];
                var isSingleRow = SimpleTypeStructureNode.GetIsSingleRow(node);
                if (isSingleRow)
                {
                    writer.StartParagraph();
                    writer.WriteSingle(context.TopicManager, node, 0);
                    writer.EndParagraph();

                    return;
                }
            }

            writer.StartTable();

            writer.StartTableHeader();
            writer.StartTableRow();

            writer.WriteRowEntry("Item");

            //writer.WriteRowEntry("Facet Value");
            writer.StartTableRowEntry();
            writer.StartParagraph();
            writer.WriteStartElement("notLocalizable"); //notLocalizable
            writer.WriteAttributeString("address", writer.GetNextNobrAddress());
            writer.WriteString("Facet Value");
            writer.WriteEndElement();                   //notLocalizable
            writer.EndParagraph();
            writer.EndTableRowEntry();

            writer.WriteRowEntry("Description");

            writer.EndTableRow();
            writer.EndTableHeader();

            writer.WriteNodes(context, root.Children, 0);

            writer.EndTable();
        }
        private static void WriteNodes(this MamlWriter writer, Context context,
                                       IEnumerable <SimpleTypeStructureNode> children, int level)
        {
            foreach (var childEntry in children)
            {
                if (childEntry.NodeType == SimpleTypeStructureNodeType.NamedType)
                {
                    continue;
                }

                writer.StartTableRow();

                var isSingleRow = SimpleTypeStructureNode.GetIsSingleRow(childEntry);
                if (isSingleRow)
                {
                    writer.WriteSingleItemAndFacet(level, context.TopicManager, childEntry);
                }
                else
                {
                    writer.WriteConstructorItemAndFacet(level, context.TopicManager, childEntry);
                }

                writer.StartTableRowEntry();
                writer.StartParagraph();
                writer.WriteSummaryForObject(context, childEntry.Node);
                writer.EndParagraph();
                writer.EndTableRowEntry();

                writer.EndTableRow();

                if (!isSingleRow)
                {
                    writer.WriteNodes(context, childEntry.Children, level + 1);
                }
            }
        }