/// <summary>Default implementation of <see cref="IDictionaryEx{K, V}.AddRange"/>. /// Merges the contents of the specified sequence into this map.</summary> public static int AddRange <K, V>(this IDictionary <K, V> dict, IEnumerable <KeyValuePair <K, V> > data, DictEditMode mode) { var e = data.GetEnumerator(); int numMissing = 0; foreach (var pair in data) { K key = pair.Key; V val = pair.Value; if (!LCInterfaces.GetAndEdit(dict, key, ref val, mode)) { numMissing++; } } return(numMissing); }
void ICollection <Num> .CopyTo(Num[] array, int arrayIndex) { LCInterfaces.CopyTo(this, array, arrayIndex); }
/// <summary>Gets the highest index at which a condition is true, or -1 if nowhere.</summary> public static int LastIndexWhere <T>(this IListAndListSource <T> list, Func <T, bool> pred) { return(LCInterfaces.LastIndexWhere(list, pred)); }
public int IndexOf(T item) { return(LCInterfaces.IndexOf(this, item)); }
void ICollectionSource <T> .CopyTo(T[] array, int arrayIndex) { LCInterfaces.CopyTo(this, array, arrayIndex); }
void ICollection <int> .CopyTo(int[] array, int arrayIndex) { LCInterfaces.CopyTo(this, array, arrayIndex); }