Esempio n. 1
0
 public FileEntry(string path, CFunction funcGraph, CThreadTimeline sortedTimeline)
 {
     filePath             = path;
     similarFiles         = new List <FileEntry>();
     graph                = funcGraph;
     threadSortedTimeline = sortedTimeline;
 }
Esempio n. 2
0
        private static FileEntry ReadFileInfoFromXML(XmlNode fileEntryNode)
        {
            string path = fileEntryNode.Attributes.GetNamedItem("path").Value;

            XmlNode         threadTimelineElement = fileEntryNode.SelectSingleNode("threadTimeline");
            CThreadTimeline threadTimeline        = ReadThreadTimelineFromXML(threadTimelineElement);

            FileEntry fileEntry = new FileEntry(path, null, threadTimeline);

            return(fileEntry);
        }
Esempio n. 3
0
        private static CThreadTimeline ReadThreadTimelineFromXML(XmlNode threadTimelineNode)
        {
            CThreadTimeline result = new CThreadTimeline(threadTimelineNode.Attributes.GetNamedItem("name").Value);

            foreach (XmlNode functionRootNode in threadTimelineNode)
            {
                result.functions.Add(ReadFunctionFromXML(functionRootNode, null));
            }

            return(result);
        }
Esempio n. 4
0
        private static void WriteFileInfoToXML(XmlElement fileInfoElement, FileEntry fileInfo, XmlDocument xmlDoc)
        {
            fileInfoElement.SetAttribute("path", fileInfo.filePath);

            XmlElement threadTimelineElement = xmlDoc.CreateElement("threadTimeline");

            fileInfoElement.AppendChild(threadTimelineElement);

            CThreadTimeline timelineToExport = fileInfo.threadSortedTimeline;

            threadTimelineElement.SetAttribute("name", timelineToExport.name);
            foreach (CFunction timelineFunction in timelineToExport.functions)
            {
                WriteFunctionTreeToXML(xmlDoc, threadTimelineElement, timelineFunction);
            }
        }