Inheritance: CiDocBlock
Ejemplo n.º 1
0
        protected override void Write(CiDocPara para, bool many)
        {
            if (many)
            {
                WriteLine();
                StartDocLine();
                WriteLine();
                StartDocLine();
            }
            foreach (CiDocInline inline in para.Children)
            {
                switch (inline)
                {
                case CiDocText text:
                    WriteDoc(text.Text);
                    break;

                case CiDocCode code:
                    Write('`');
                    WriteDoc(code.Text);
                    Write('`');
                    break;

                default:
                    throw new ArgumentException(inline.GetType().Name);
                }
            }
        }
Ejemplo n.º 2
0
        protected virtual void Write(CiDocPara para, bool many)
        {
            if (many)
            {
                WriteLine();
                Write(" * <p>");
            }
            foreach (CiDocInline inline in para.Children)
            {
                switch (inline)
                {
                case CiDocText text:
                    WriteXmlDoc(text.Text);
                    break;

                case CiDocCode code:;
                    Write("<code>");
                    WriteXmlDoc(code.Text);
                    Write("</code>");
                    break;

                default:
                    throw new ArgumentException(inline.GetType().Name);
                }
            }
        }
Ejemplo n.º 3
0
        void Write(CiDocPara para)
        {
            foreach (CiDocInline inline in para.Children)
            {
                switch (inline)
                {
                case CiDocText text:
                    WriteDoc(text.Text);
                    break;

                case CiDocCode code:
                    switch (code.Text)
                    {
                    case "true":
                    case "false":
                    case "null":
                        Write("<see langword=\"");
                        Write(code.Text);
                        Write("\" />");
                        break;

                    default:
                        Write("<c>");
                        WriteDoc(code.Text);
                        Write("</c>");
                        break;
                    }
                    break;

                default:
                    throw new ArgumentException(inline.GetType().Name);
                }
            }
        }
Ejemplo n.º 4
0
        void Write(CiDocPara para)
        {
            foreach (CiDocInline inline in para.Children)
            {
                CiDocText text = inline as CiDocText;
                if (text != null)
                {
                    WriteDoc(text.Text);
                    continue;
                }
                CiDocCode code = inline as CiDocCode;
                if (code != null)
                {
                    switch (code.Text)
                    {
                    case "true": Write("<see langword=\"true\" />"); break;

                    case "false": Write("<see langword=\"false\" />"); break;

                    case "null": Write("<see langword=\"null\" />"); break;

                    default:
                        Write("<c>");
                        WriteDoc(code.Text);
                        Write("</c>");
                        break;
                    }
                    continue;
                }
                throw new ArgumentException(inline.GetType().Name);
            }
        }
Ejemplo n.º 5
0
        public CiCodeDoc ParseCodeDoc()
        {
            CiDocPara         summary = ParsePara();
            List <CiDocBlock> details = new List <CiDocBlock>();

            if (Eat(CiDocToken.Period))
            {
                while (!See(CiDocToken.EndOfFile))
                {
                    details.Add(ParseBlock());
                }
            }
            return(new CiCodeDoc {
                Summary = summary, Details = details.ToArray()
            });
        }
Ejemplo n.º 6
0
        protected override void Write(CiDocPara para, bool many)
        {
            if (many)
            {
                WriteLine();
                Write("/// <para>");
            }
            foreach (CiDocInline inline in para.Children)
            {
                switch (inline)
                {
                case CiDocText text:
                    WriteXmlDoc(text.Text);
                    break;

                case CiDocCode code:
                    switch (code.Text)
                    {
                    case "true":
                    case "false":
                    case "null":
                        Write("<see langword=\"");
                        Write(code.Text);
                        Write("\" />");
                        break;

                    default:
                        Write("<c>");
                        WriteXmlDoc(code.Text);
                        Write("</c>");
                        break;
                    }
                    break;

                default:
                    throw new ArgumentException(inline.GetType().Name);
                }
            }
            if (many)
            {
                Write("</para>");
            }
        }
Ejemplo n.º 7
0
Archivo: GenPerl5.cs Proyecto: epi/cito
	void Write(CiDocPara para)
	{
		foreach (CiDocInline inline in para.Children) {
			CiDocText text = inline as CiDocText;
			if (text != null) {
				WriteDoc(text.Text);
				continue;
			}
			CiDocCode code = inline as CiDocCode;
			if (code != null) {
				Write("C<");
				WriteDoc(code.Text);
				Write('>');
				continue;
			}
			throw new ArgumentException(inline.GetType().Name);
		}
		WriteLine();
		WriteLine();
	}
Ejemplo n.º 8
0
 void Write(CiDocPara para)
 {
     foreach (CiDocInline inline in para.Children)
     {
         CiDocText text = inline as CiDocText;
         if (text != null)
         {
             WriteDoc(text.Text);
             continue;
         }
         CiDocCode code = inline as CiDocCode;
         if (code != null)
         {
             Write("<code>");
             WriteDoc(code.Text);
             Write("</code>");
             continue;
         }
         throw new ArgumentException(inline.GetType().Name);
     }
 }
Ejemplo n.º 9
0
        void Write(CiDocPara para)
        {
            foreach (CiDocInline inline in para.Children)
            {
                switch (inline)
                {
                case CiDocText text:
                    WriteDoc(text.Text);
                    break;

                case CiDocCode code:;
                    Write("<code>");
                    WriteDoc(code.Text);
                    Write("</code>");
                    break;

                default:
                    throw new ArgumentException(inline.GetType().Name);
                }
            }
        }
Ejemplo n.º 10
0
 void Write(CiDocPara para)
 {
     foreach (CiDocInline inline in para.Children)
     {
         CiDocText text = inline as CiDocText;
         if (text != null)
         {
             WriteDoc(text.Text, false);
             continue;
         }
         // TODO: $(D_CODE x) pastes "<pre>x</pre>" -
         // find some better alternative
         CiDocCode code = inline as CiDocCode;
         if (code != null)
         {
             WriteDoc(code.Text, true);
             continue;
         }
         throw new ArgumentException(inline.GetType().Name);
     }
 }
Ejemplo n.º 11
0
Archivo: GenCs.cs Proyecto: epi/cito
 void Write(CiDocPara para)
 {
     foreach (CiDocInline inline in para.Children) {
     CiDocText text = inline as CiDocText;
     if (text != null) {
         WriteDoc(text.Text);
         continue;
     }
     CiDocCode code = inline as CiDocCode;
     if (code != null) {
         switch (code.Text) {
         case "true": Write("<see langword=\"true\" />"); break;
         case "false": Write("<see langword=\"false\" />"); break;
         case "null": Write("<see langword=\"null\" />"); break;
         default:
             Write("<c>");
             WriteDoc(code.Text);
             Write("</c>");
             break;
         }
         continue;
     }
     throw new ArgumentException(inline.GetType().Name);
     }
 }
Ejemplo n.º 12
0
Archivo: GenD.cs Proyecto: epi/cito
 void Write(CiDocPara para)
 {
     foreach (CiDocInline inline in para.Children) {
     CiDocText text = inline as CiDocText;
     if (text != null) {
         WriteDoc(text.Text, false);
         continue;
     }
     // TODO: $(D_CODE x) pastes "<pre>x</pre>" -
     // find some better alternative
     CiDocCode code = inline as CiDocCode;
     if (code != null) {
         WriteDoc(code.Text, true);
         continue;
     }
     throw new ArgumentException(inline.GetType().Name);
     }
 }