/// <summary> /// Write out a type reference /// </summary> /// <param name="type">The type reference information</param> /// <param name="options">The link display options</param> /// <param name="writer">The write to which the information is written</param> /// <param name="dictionary">The template type dictionary</param> private void WriteType(TypeReference type, DisplayOptions options, XmlWriter writer, Dictionary <IndexedTemplateTypeReference, TypeReference> dictionary) { if (type == null) { throw new ArgumentNullException("type"); } if (writer == null) { throw new ArgumentNullException("writer"); } SimpleTypeReference simple = type as SimpleTypeReference; if (simple != null) { WriteSimpleType(simple, options, writer); return; } SpecializedTypeReference specialized = type as SpecializedTypeReference; if (specialized != null) { WriteSpecializedType(specialized, options, writer); return; } ArrayTypeReference array = type as ArrayTypeReference; if (array != null) { WriteArrayType(array, options, writer, dictionary); return; } ReferenceTypeReference reference = type as ReferenceTypeReference; if (reference != null) { WriteReferenceType(reference, options, writer, dictionary); return; } PointerTypeReference pointer = type as PointerTypeReference; if (pointer != null) { WritePointerType(pointer, options, writer, dictionary); return; } TemplateTypeReference template = type as TemplateTypeReference; if (template != null) { WriteTemplateType(template, options, writer, dictionary); return; } throw new InvalidOperationException("Unknown type reference type"); }
private void WritePointerType(PointerTypeReference pointer, DisplayOptions options, XmlWriter writer, Dictionary <IndexedTemplateTypeReference, TypeReference> dictionary) { WriteType(pointer.PointedToType, options, writer, dictionary); writer.WriteString("*"); }
private void WritePointerType(PointerTypeReference pointer, DisplayOptions options, XmlWriter writer, Dictionary<IndexedTemplateTypeReference, TypeReference> dictionary) { WriteType(pointer.PointedToType, options, writer, dictionary); writer.WriteString("*"); }