/// <summary> /// Initializes a new instance of the <see cref="ImmutableDictionary<TKey, TValue>"/> class. /// </summary> /// <param name="root">The root.</param> /// <param name="comparers">The comparers.</param> /// <param name="count">The number of elements in the map.</param> private ImmutableDictionary(ImmutableSortedDictionary <int, HashBucket> .Node root, Comparers comparers, int count) : this(Requires.NotNull(comparers, "comparers")) { Requires.NotNull(root, "root"); root.Freeze(FreezeBucketAction); this.root = root; this.count = count; }
/// <summary> /// Initializes a new instance of the <see cref="ImmutableHashSet<T>"/> class. /// </summary> /// <param name="root">The sorted set that this set wraps.</param> /// <param name="equalityComparer">The equality comparer used by this instance.</param> /// <param name="count">The number of elements in this collection.</param> private ImmutableHashSet(ImmutableSortedDictionary <int, HashBucket> .Node root, IEqualityComparer <T> equalityComparer, int count) { Requires.NotNull(root, "root"); Requires.NotNull(equalityComparer, "equalityComparer"); root.Freeze(FreezeBucketAction); this.root = root; this.count = count; this.equalityComparer = equalityComparer; }