Exemplo n.º 1
0
        private void WriteReferenceType(ReferenceTypeReference reference, DisplayOptions options, XmlWriter writer, Dictionary <IndexedTemplateTypeReference, TypeReference> dictionary)
        {
            WriteType(reference.ReferredToType, options, writer, dictionary);

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "languageSpecificText");
            // add % in C++
            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "cpp");
            writer.WriteString("%");
            writer.WriteEndElement();
            writer.WriteEndElement();
        }
Exemplo n.º 2
0
        /// <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");
        }
Exemplo n.º 3
0
        private void WriteReferenceType(ReferenceTypeReference reference, DisplayOptions options, XmlWriter writer, Dictionary<IndexedTemplateTypeReference, TypeReference> dictionary)
        {
            WriteType(reference.ReferredToType, options, writer, dictionary);

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "languageSpecificText");
            // add % in C++
            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "cpp");
            writer.WriteString("%");
            writer.WriteEndElement();
            writer.WriteEndElement();
        }