Наследование: CiDocInline
Пример #1
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);
            }
        }
Пример #2
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);
     }
 }
Пример #3
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);
     }
 }