Go to the documentation of this file.00001 using System.Collections.Generic;
00002
00003 namespace N2.Collections
00004 {
00008 public class InverseFilter : ItemFilter
00009 {
00010 private ItemFilter filterToInverse;
00011
00012 public InverseFilter(ItemFilter filterToInverse)
00013 {
00014 this.filterToInverse = filterToInverse;
00015 }
00016
00017 public override bool Match(ContentItem item)
00018 {
00019 return !filterToInverse.Match(item);
00020 }
00021
00022 public static void FilterInverse(IList<ContentItem> items, ItemFilter filterToInverse)
00023 {
00024 Filter(items, new InverseFilter(filterToInverse));
00025 }
00026 }
00027 }