Exemplo n.º 1
0
        /// <summary>
        /// Removes several keys from this key-value map.
        /// </summary>
        /// <param name="keys">A sequence of keys to remove. Can be much faster if it's a set compatible with this map.</param>
        /// <returns></returns>
        public override ImmMap <TKey, TValue> RemoveRange(IEnumerable <TKey> keys)
        {
            keys.CheckNotNull("keys");
            var set = keys as ImmSet <TKey>;

            if (set != null && _equality.Equals(set.EqualityComparer))
            {
                return(_root.Except(set.Root, Lineage.Mutable()).WrapMap(_equality));
            }
            return(base.RemoveRange(keys));
        }
Exemplo n.º 2
0
 protected override ImmSet <T> Except(ImmSet <T> other)
 {
     return(Root.Except(other.Root, Lineage.Mutable()).Wrap(EqualityComparer));
 }