Castle.MonoRail.Framework.FilterAttribute.FilterAttribute C# (CSharp) Method

FilterAttribute() public method

Constructs a FilterAttribute associating the filter type and when the filter should be invoked.
public FilterAttribute ( ExecuteEnum when, Type filterType ) : System
when ExecuteEnum When to execute the filter
filterType System.Type The filter implementation
return System
		public FilterAttribute(ExecuteEnum when, Type filterType)
		{
			if (!typeof(IFilter).IsAssignableFrom(filterType))
			{
				throw new ArgumentException("The specified type does not implement IFilter");
			}

			this.filterType = filterType;
			this.when = when;
		}