private static void WriteSingle(this MamlWriter writer, TopicManager topicManager,
                                        SimpleTypeStructureNode node, int indentLevel)
        {
            switch (node.NodeType)
            {
            case SimpleTypeStructureNodeType.Any:
                writer.WriteIndent(indentLevel);
                writer.WriteString("Any");
                break;

            case SimpleTypeStructureNodeType.Mixed:
                writer.WriteIndent(indentLevel);
                writer.WriteString("Mixed");
                break;

            case SimpleTypeStructureNodeType.NamedType:
                writer.WriteIndent(indentLevel);
                writer.WriteTypeName(topicManager, (XmlSchemaType)node.Node);
                break;

            case SimpleTypeStructureNodeType.List:
                writer.StartArtItem(ArtItem.List, indentLevel);
                writer.WriteTypeNamesMarkup(topicManager, node.Children);
                writer.EndArtItem();
                break;

            case SimpleTypeStructureNodeType.Union:
                writer.StartArtItem(ArtItem.Union, indentLevel);
                writer.WriteTypeNamesMarkup(topicManager, node.Children);
                writer.EndArtItem();
                break;

            default:
                throw ExceptionBuilder.UnhandledCaseLabel(node.NodeType);
            }
        }
            protected override void Visit(XmlSchemaSimpleTypeUnion union)
            {
                foreach (var baseMemberType in union.BaseMemberTypes)
                {
                    if (!baseMemberType.QualifiedName.IsEmpty)
                    {
                        continue;
                    }

                    _writer.WriteArtItemWithText(ArtItem.Union, "Union");
                    return;
                }

                _writer.StartArtItem(ArtItem.Union);

                var isFirst = true;

                foreach (var baseMemberType in union.BaseMemberTypes)
                {
                    if (isFirst)
                    {
                        _writer.WriteString(", ");
                        isFirst = false;
                    }

                    var topic = _context.TopicManager.GetTopic(baseMemberType);
                    if (topic != null)
                    {
                        _writer.WriteTopicLink(topic);
                    }
                    else
                    {
                        _writer.WriteString(baseMemberType.QualifiedName.Name);
                    }
                }

                _writer.EndArtItem();
            }
        private static void WriteConstructor(this MamlWriter writer, int level, TopicManager topicManager,
                                             SimpleTypeStructureNode node, ArtItem constructionArtItem, string constructName)
        {
            writer.StartTableRowEntry();
            writer.StartParagraph();
            //writer.WriteHtmlIndent(level);
            writer.StartArtItem(constructionArtItem, level);
            if (ContainsNamedTypes(node.Children))
            {
                writer.WriteTypeNamesMarkup(topicManager, node.Children);
            }
            else
            {
                writer.WriteString(constructName);
            }
            writer.EndArtItem();
            writer.EndParagraph();
            writer.EndTableRowEntry();

            writer.StartTableRowEntry();
            writer.WriteParagraph(String.Empty);
            writer.EndTableRowEntry();
        }