// error public int check_section(Section section) { if (section.SectionName_ == "PROCESS") { // type별 } else if (section.SectionName_ == "PROCESS") { } return 0; }
private List<Section> get_section(string tag_infoStr) { string token_op = "["; string token_cl = "]"; int tag_start = tag_infoStr.IndexOf(token_op); List<Section> results = new List<Section>(); int pos_op = 0; int pos_cl = 0; int maxLoop = 20; int roopCounter = 0; while (tag_start != -1) { pos_op = tag_infoStr.IndexOf(token_op, pos_op); pos_cl = tag_infoStr.IndexOf(token_cl, pos_op); int next_pos_op = tag_infoStr.IndexOf(token_op, pos_op + 1); Section s = new Section(); string section_name = tag_infoStr.Substring(pos_op + 1,pos_cl - pos_op - 1); string section_content = (next_pos_op != -1 ? tag_infoStr.Substring(pos_cl + 1, next_pos_op - pos_cl - 1) : tag_infoStr.Substring(pos_cl + 1, tag_infoStr.Length - (pos_cl + 1))); s.SectionName_ = section_name; s.read_input(section_content); results.Add(s); tag_start = next_pos_op; pos_op += 1; roopCounter += 1; if (roopCounter > maxLoop) return results; } return results; }