public static IFilter Create(MootaDootaDefinishin md) { List <IFilter> metadataFilters = new List <IFilter>() { MetadataFilterInfo.Create <int>(n => n == 1, "Section 1") }; metadataFilters.Add(KwestionaireModelFilterInfo.MagicFilter(md.MagicNumber)); metadataFilters.Add(KwestionaireModelFilterInfo.DangerFilter(md.DangerNumber)); return(new MootaDootaFilterCollection(metadataFilters)); }
public static MetadataFilterInfo DangerFilter(int dangerNumber) { return(MetadataFilterInfo.Create <KwoteModel>(m => m.DangerNumber == dangerNumber, "DangerNumber == " + dangerNumber)); }
public static MetadataFilterInfo MagicFilter(int magicNumber) { return(MetadataFilterInfo.Create <KwoteModel>(m => m.MagicNumber == magicNumber, "MagicNumber ==" + magicNumber)); }