Пример #1
0
        public void ForEach(ForEachDictionaryDelegate <TKey, TValue> action)
        {
            if (action == null)
            {
                throw new ArgumentNullException("action");
            }

            foreach (var pair in this)
            {
                action(pair.Key, pair.Value);
            }
        }
Пример #2
0
        /// <summary>
        /// Executes the same action for all the pairs in this dictionary. This
        /// is usually faster than iterating the dictionary.
        /// </summary>
        public void ForEach(ForEachDictionaryDelegate <TKey, TValue> action)
        {
            var owner = _GetOwner();

            owner.ForEach(action);
        }