Exemplo n.º 1
0
        public ImmutableMap <TKey, TValue> AddRange([NotNull] IEnumerable <KeyValuePair <TKey, TValue> > pairs)
        {
            if (pairs is null)
            {
                throw new ArgumentNullException(nameof(pairs));
            }

            pairs = pairs.Materialize();

            return(new ImmutableMap <TKey, TValue>(Base.AddRange(pairs), Reversed.AddRange(pairs.ReversePairs())));
        }