Ejemplo n.º 1
0
        private void WriteProcedureName(ProcedureTarget target, XmlWriter writer)
        {
            MemberReference implements = target.ExplicitlyImplements;

            if (implements == null)
            {
                if (target.IsConversionOperator)
                {
                    WriteConversionOperator(target, writer);
                }
                else
                {
                    writer.WriteString(target.Name);
                }
            }
            else
            {
                WriteMember(implements, DisplayOptions.ShowContainer, writer);
            }
        }
Ejemplo n.º 2
0
        private static void WriteConversionOperator(ProcedureTarget target, XmlWriter writer)
        {
            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "languageSpecificText");

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "cs");
            writer.WriteString(target.Name);
            writer.WriteEndElement();

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "vb");
            if (target.Name == "Explicit")
            {
                writer.WriteString("Narrowing");
            }
            else if (target.Name == "Implicit")
            {
                writer.WriteString("Widening");
            }
            writer.WriteEndElement();

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "cpp");
            writer.WriteString(target.Name);
            writer.WriteEndElement();

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "nu");
            writer.WriteString(target.Name);
            writer.WriteEndElement();

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "fs");
            writer.WriteString(target.Name);
            writer.WriteEndElement();

            writer.WriteEndElement();
        }
Ejemplo n.º 3
0
        private static void WriteConversionOperator(ProcedureTarget target, XmlWriter writer)
        {
            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "languageSpecificText");

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "cs");
            writer.WriteString(target.Name);
            writer.WriteEndElement();

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "vb");
            if(target.Name == "Explicit")
            {
                writer.WriteString("Narrowing");
            }
            else if(target.Name == "Implicit")
            {
                writer.WriteString("Widening");
            }
            writer.WriteEndElement();

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "cpp");
            writer.WriteString(target.Name);
            writer.WriteEndElement();

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "nu");
            writer.WriteString(target.Name);
            writer.WriteEndElement();

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "fs");
            writer.WriteString(target.Name);
            writer.WriteEndElement();

            writer.WriteEndElement();
        }
Ejemplo n.º 4
0
        private void WriteProcedureName(ProcedureTarget target, XmlWriter writer)
        {
            MemberReference implements = target.ExplicitlyImplements;

            if(implements == null)
            {
                if(target.IsConversionOperator)
                    WriteConversionOperator(target, writer);
                else
                    writer.WriteString(target.Name);
            }
            else
                WriteMember(implements, DisplayOptions.ShowContainer, writer);
        }