codecoveragemethodstreenode.cs

来自「SharpDevelop2.0.0 c#开发免费工具」· CS 代码 · 共 50 行

CS
50
字号
// <file>
//     <copyright see="prj:///doc/copyright.txt"/>
//     <license see="prj:///doc/license.txt"/>
//     <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
//     <version>$Revision: 1084 $</version>
// </file>

using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using System;
using System.Collections.Generic;

namespace ICSharpCode.CodeCoverage
{
	/// <summary>
	/// Represents a code coverage tree node that has associated
	/// methods.
	/// </summary>
	public class CodeCoverageMethodsTreeNode : CodeCoverageTreeNode
	{
		List<CodeCoverageMethod> methods = new List<CodeCoverageMethod>();
				
		public CodeCoverageMethodsTreeNode(string name, List<CodeCoverageMethod> methods, CodeCoverageImageListIndex index) : base(name, index)
		{
			this.methods = methods;
			if (methods.Count > 0) {
				// Add dummy node.
				Nodes.Add(new ExtTreeNode());
			}
			
			int visitedCount = 0;
			int notVisitedCount = 0;
			foreach (CodeCoverageMethod method in methods) {
				visitedCount += method.VisitedSequencePointsCount;
				notVisitedCount += method.NotVisitedSequencePointsCount;
			}
			
			Name = name;
			VisitedCount = visitedCount;
			NotVisitedCount = notVisitedCount;
		}
		
		public List<CodeCoverageMethod> Methods {
			get {
				return methods;
			}
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?