//============================================================ // <T>获取命名空间和结束行索引。</T> // @parame strlines 需要获取的字符串集合。 // @param index 当前索引 // @param out string 获取的命名空间对象 // @return 命名空间的结束行索引 //============================================================ public static int ParserSpace(FStrings strLines, int index, out string spaceString) { FCsSpace space = new FCsSpace(); int end = space.GetPairNum(strLines, index); string strTemp = strLines[index].ToString().Trim(); spaceString = space.GetSpaceName(strTemp); return(end); }
//============================================================ // <T>解析文件。</T> // // @parame fileinfo 要解析的文件 // @param index 解析对象 //============================================================ public void ParserFile(FileInfo file, string outputPath, FClassesIndexTable indextable, StreamWriter swPrint, string relative) { FStrings lines = GetLines(file.DirectoryName + "\\" + file.Name); for (int n = 0; n < lines.Count; n++) { //string line = ConvertToUTF8 ( lines[n].ToString() ); if (IsSpace(lines[n].ToString())) { FCsSpace space = new FCsSpace(); space.FillValue(lines, n, space.GetPairNum(lines, n)); string path = outputPath + "\\" + space.SpaceName.Trim(); space.ParserSpace(lines, n, path, indextable, swPrint, file, relative); } } }