示例#1
0
        /// <summary>
        /// Construct each SubResult node and return Xml string.
        /// </summary>
        /// <returns></returns>
        public string OutputPerfResults()
        {
            string innerxml = null;

            // Based on Targets order listed in ErrorCodes.xml construct the Xml
            for (int i = 0; i < TargetsToList.Count; i++)
            {
                string targetname         = TargetsToList[i].ToString().ToLowerInvariant();
                IDictionaryEnumerator ide = subresults.GetEnumerator();
                while (ide.MoveNext())
                {
                    PerfSubResult perfsubresult = (PerfSubResult)ide.Value;
                    // Check targetname specified in ErrorCodes.xml with current targetname.
                    if (perfsubresult.SubResultName.ToLowerInvariant().Contains(targetname))
                    {
                        if (targetname.Contains(ReportNode.ToLowerInvariant()))
                        {
                            perfsubresult.ProjectFileName = this.projectname;
                            innerxml += perfsubresult.GetSubResultXml(bmainprojectfile);
                        }
                        else
                        {
                            innerxml += perfsubresult.GetSubResultXml(false);
                        }
                        break;
                    }
                }
            }

            return(innerxml);
        }