/// <summary> /// Add or change a filter set /// </summary> public static void SetFilterSet <T>(DocumentFilterSet <T> filterSet) { if (filterSet == null) { throw new ArgumentNullException("filterSet"); } lock (Filters) { Filters[typeof(T)] = filterSet; } }
/// <summary> /// Add or change filter, replacing the entire filter set if present /// </summary> public static void SetFilter <T>(IDocumentFilter <T> filter) { if (filter == null) { throw new ArgumentNullException("filter"); } lock (Filters) { Filters[typeof(T)] = new DocumentFilterSet <T>(filter); } }