private void WriteTypeTarget (TypeTarget type, DisplayOptions options, bool showOuterType, XmlWriter writer) {

            // write namespace, if containers are requested
            if ((options & DisplayOptions.ShowContainer) > 0) {
                WriteNamespace(type.Namespace, DisplayOptions.Default, writer);
                WriteSeperator(writer);
            }

            // write outer type, if one exists
            if (showOuterType && (type.OuterType != null)) {
                WriteSimpleType(type.OuterType, DisplayOptions.Default, writer);
                WriteSeperator(writer);
            }
           
            // write the type name
            writer.WriteString(type.Name);

            // write if template parameters, if they exist and we are requested
            if ((options & DisplayOptions.ShowTemplates) > 0) {
                WriteTemplateParameters(type.Templates, writer);
            }
        }
        private static TypeTarget CreateTypeTarget (XPathNavigator api, LinkType2 linkType) {
            string subgroup = (string)api.Evaluate(apiSubgroupExpression);

            TypeTarget target;
            if (subgroup == "enumeration") {
                target = CreateEnumerationTarget(api, linkType);
            } else {
                target = new TypeTarget();
            }

            target.name = (string) api.Evaluate(apiNameExpression);

            // containing namespace
            XPathNavigator namespaceNode = api.SelectSingleNode(apiContainingNamespaceExpression);
            target.containingNamespace = CreateNamespaceReference(namespaceNode);

            // containing type, if any
            XPathNavigator typeNode = api.SelectSingleNode(apiContainingTypeExpression);
            if (typeNode == null) {
                target.containingType = null;
            } else {
                target.containingType = CreateSimpleTypeReference(typeNode);
            }

            // templates
            target.templates = GetTemplateNames(api);

            return(target);
        }
 public void WriteTypeTarget (TypeTarget type, DisplayOptions options, XmlWriter writer) {
     if (type == null) throw new ArgumentNullException("type");
     if (writer == null) throw new ArgumentNullException("writer");
     WriteTypeTarget(type, options, true, writer);
 }