//============================================================ // <T>解析类对象的注释信息。</T> //============================================================ public void ParserClassAnnotate() { FStrings description = new FStrings(); for (int n = 0; n < Annotates.Count; n++) { string strtemp = Annotates[n].ToString().Trim(); if (strtemp.Contains("</T>")) { strtemp = strtemp.Replace("</T>", ""); if (strtemp.Contains("<T>")) { strtemp = strtemp.Substring(strtemp.IndexOf("<T>") + 3).Trim(); } Label = strtemp.Trim(); } if (strtemp.Contains("</P>")) { strtemp = strtemp.Replace("</P>", ""); if (strtemp.Contains("<P>")) { strtemp = strtemp.Substring(strtemp.IndexOf("<P>") + 3).Trim(); } description.Add(strtemp); } } if (description != null && description.Count > 0) { for (int n = 0; n < description.Count; n++) { Description += description[n].ToString().Trim(); } } }
//============================================================ // <T>获取段落注释</T> // // @param strLine 要获取的字符串集合 // @param index 当前索引 // @return 段落注释 //============================================================ public FStrings GetAnnotate(FStrings strLine, int index) { FStrings str = new FStrings(); if (!strLine[index - 1].Contains(_annotate)) { return(str); } else { int i = index - 2; while (!strLine[i].Contains("}") && !strLine[i].Contains("{") && !strLine[i].Contains(_annotate) && strLine[i].Trim().StartsWith("//") && i >= 0) { i--; } for (i++; i < index - 1; i++) { str.Add(strLine[i]); } return(str); } }