public void insert(std_map <TKey, TValue> _other, int beginpos, int beforeendpos) { int index = 0; bool find_begin = false; bool find_end = false; foreach (var v in _other) { if (index == beginpos) { find_begin = true; } if (index >= beforeendpos) { find_end = true; break; } if (find_begin && !find_end) { if (!base.ContainsKey(v.Key)) { base.Add(v.Key, v.Value); } } index++; } }
public static void swap(ref std_map <TKey, TValue> _this, ref std_map <TKey, TValue> _other) { std_map <TKey, TValue> temp = _this; _this = _other; _other = temp; }
public static std_pair <TKey, TValue>[] get_allocator(std_map <TKey, TValue> _this) { KeyValuePair <TKey, TValue>[] array = new KeyValuePair <TKey, TValue> [_this.Count]; _this.CopyTo(array, 0); std_pair <TKey, TValue>[] sps = new std_pair <TKey, TValue> [_this.Count]; for (int i = 0; i < _this.Count; i++) { sps[i] = new std_pair <TKey, TValue>(array[i]); } return(sps); }