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; }