예제 #1
0
        /// <summary>
        /// Sets subresult node in Perf schema.
        /// </summary>
        /// <param name="subresultname"></param>
        /// <param name="subresultelapsedtime"></param>
        internal void SetSubResult(string subresultname, int subresultelapsedtime)
        {
            if (subresults == null)
            {
                subresults = new Hashtable();
            }

            PerfSubResult subresult;

            if (subresults.Count > 0 && subresults[subresultname] != null)
            {
                subresult = (PerfSubResult)subresults[subresultname];
                subresults.Remove(subresultname);
                subresult.SubResultTime = subresultelapsedtime;
                subresults.Add(subresultname, subresult);
            }
            else
            {
                subresult = new PerfSubResult();
                subresult.Initialize();
                subresult.SubResultName = subresultname;
                subresult.SubResultTime = subresultelapsedtime;
                subresults.Add(subresultname, subresult);
            }
        }