private void AddRow(CoverageRowViewModel row)
 {
     int count = coverageViewModel.Data.Count;
     if (count > 0)
     {
         CoverageRowViewModel parent;
         if (coverageViewModel.Data[count - 1].TreeLevel < row.TreeLevel)
         {
             parent = coverageViewModel.Data[count - 1];
         }
         else
         {
             parent = coverageViewModel.Data[count - 1].ParentRow;
             for (int i = 0; i < coverageViewModel.Data[count - 1].TreeLevel - row.TreeLevel; i++)
             {
                 parent = parent.ParentRow;
             }
         }
         row.ParentRow = parent;
         parent.ChildRows.Add(row);
     }
     coverageViewModel.Data.Add(row);
 }
 private CoverageRowViewModel InitializeSrcFileRow(Item srcFiletem)
 {
     CoverageRowViewModel srcFileRow = new CoverageRowViewModel();
     srcFileRow.Name = srcFiletem.Name;
     srcFileRow.IsCollapse = false;
     srcFileRow.IsSrcFileModel = true;
     srcFileRow.SrcFileName = ((SrcFileItem)srcFiletem).FullName;
     srcFileRow.CoverageStates = srcFiletem.CoveredLines;
     srcFileRow.Lines = srcFiletem.Lines;
     GetCoverage(srcFileRow, srcFiletem);
     return srcFileRow;
 }
 private CoverageRowViewModel InitializePackageRow(Item packageItem)
 {
     CoverageRowViewModel packageRow = new CoverageRowViewModel();
     packageRow.Name = packageItem.Name;
     packageRow.TreeLevel = 0;
     packageRow.IsCollapse = false;
     GetCoverage(packageRow, packageItem);
     return packageRow;
 }
 private CoverageRowViewModel InitializeMethodRow(Item methodItem)
 {
     CoverageRowViewModel methodRow = new CoverageRowViewModel();
     methodRow.Name = methodItem.Name;
     methodRow.TreeIconVisiblity = Visibility.Collapsed;
     methodRow.RowVisiblity = Visibility.Collapsed;
     MethodItem mi = methodItem as MethodItem;
     GetCoverage(methodRow, methodItem);
     return methodRow;
 }
 private CoverageRowViewModel InitializeClassRow(Item classItem)
 {
     CoverageRowViewModel classRow = new CoverageRowViewModel();
     classRow.Name = classItem.Name;
     classRow.IsCollapse = true;
     ClassItem ci = classItem as ClassItem;
     classRow.SrcFileName = ci.Descriptor.SrcFileName;
     GetCoverage(classRow, classItem);
     return classRow;
 }
 private void GetCoverage(CoverageRowViewModel row, Item item)
 {
     row.TotalBlocksCount = item.TotlaBlocksCount;
     row.TotalLinesCount = item.TotalLinesCount;
     row.CoveredBlocksCount = item.CoveredBlocksCount;
     row.CoveredLinesCount = item.CoveredLinesCount;
 }