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); } } }
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); } } }
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); } } }
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); } }
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() }); }
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>"); } }
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(); }
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); } }
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); } } }
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); } }