예제 #1
0
 private void WriteSequencePoints(XmlElement node)
 {
     foreach (int fileRef in m_docWriters.Keys)
     {
         foreach (var list in m_sequencePoints[fileRef])
         {
             list.Clear();
         }
     }
     foreach (XmlElement entry in node["sequencepoints"].ChildNodes)
     {
         int fileRef = Util.ToInt32(entry.GetAttribute("file_ref"));
         m_sequencePoints[fileRef][(int)SequencePoint.il_offset].Add(
             Util.ToInt32(entry.GetAttribute("il_offset"), 16));
         m_sequencePoints[fileRef][(int)SequencePoint.start_row].Add(
             Util.ToInt32(entry.GetAttribute("start_row")));
         m_sequencePoints[fileRef][(int)SequencePoint.start_column].Add(
             Util.ToInt32(entry.GetAttribute("start_column")));
         m_sequencePoints[fileRef][(int)SequencePoint.end_row].Add(Util.ToInt32(entry.GetAttribute("end_row")));
         m_sequencePoints[fileRef][(int)SequencePoint.end_column].Add(
             Util.ToInt32(entry.GetAttribute("end_column")));
     }
     foreach (int file_ref in m_sequencePoints.Keys)
     {
         m_writer.DefineSequencePoints(
             m_docWriters[file_ref],
             m_sequencePoints[file_ref][(int)SequencePoint.il_offset].ToArray(),
             m_sequencePoints[file_ref][(int)SequencePoint.start_row].ToArray(),
             m_sequencePoints[file_ref][(int)SequencePoint.start_column].ToArray(),
             m_sequencePoints[file_ref][(int)SequencePoint.end_row].ToArray(),
             m_sequencePoints[file_ref][(int)SequencePoint.end_column].ToArray()
             );
     }
 }