⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 namefilter.cs

📁 C#编写的网络爬虫程序 效率很高 很好用!
💻 CS
字号:
using System;
using System.Collections;

namespace NUnit.Core
{
	/// <summary>
	/// Summary description for NameFilter.
	/// </summary>
	/// 
	[Serializable]
	public class NameFilter : Filter
	{
		private ArrayList testNodes;

		public NameFilter(Test node)
		{
			testNodes = new ArrayList();
			testNodes.Add(node);
		}

		public NameFilter(ArrayList nodes) 
		{
			testNodes = nodes;
		}

		public override bool Pass(TestSuite suite) 
		{
			bool passed = Exclude;

			foreach (Test node in testNodes) 
			{
				if (suite.IsDescendant(node) || node.IsDescendant(suite) || node == suite) 
				{
					passed = !Exclude;
					break;
				}
			}

			return passed;
		}

		public override bool Pass(TestCase test) 
		{
			bool passed = Exclude;

			foreach(Test node in testNodes) 
			{
				if (test.IsDescendant(node) || test == node) 
				{
					passed = !Exclude;
					break;
				}
			}

			return passed;
		}
	}
}

⌨️ 快捷键说明

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