filter.cs

来自「C#编写的网络爬虫程序 效率很高 很好用!」· CS 代码 · 共 48 行

CS
48
字号
using System;
using System.Collections;

namespace NUnit.Core
{
	/// <summary>
	/// Summary description for Filter.
	/// </summary>
	public interface IFilter
	{
		bool Pass(TestSuite suite);

		bool Pass(TestCase test); 
	}

	[Serializable]
	public abstract class Filter : IFilter
	{
		private bool exclude;

		public Filter() : this( false ) { }

		public Filter( bool exclude )
		{
			this.exclude = exclude;
		}

		public bool Exclude
		{
			get { return exclude; }
			set { exclude = value; }
		}

		public void Negate()
		{
			exclude = !exclude;
		}

		#region IFilter Members

		public abstract bool Pass(TestSuite suite);

		public abstract bool Pass(TestCase test);

		#endregion
	}
}

⌨️ 快捷键说明

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