Exemple #1
0
        public static Dictionary <TKey, TValue> FindAll <TKey, TValue>(
            this Dictionary <TKey, TValue> dictionary,
            Predicate <KeyValuePair <TKey, TValue> > match)
        {
            Dictionary <TKey, TValue> result = new Dictionary <TKey, TValue>();

            SystemExtensions.ForEach <KeyValuePair <TKey, TValue> >((IEnumerable <M0>)dictionary, (Action <M0>)(x =>
            {
                if (!match(x))
                {
                    return;
                }
                result.Add(x.Key, x.Value);
            }));
            return(result);
        }