Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ToImmutableDictionary< TKey, TValue >() [3/4]

static ImmutableDictionary< TKey, TValue > System.Collections.Immutable.ImmutableDictionary< TKey, TValue >.ToImmutableDictionary< TKey, TValue > ( this IEnumerable< KeyValuePair< TKey, TValue > > source,
IEqualityComparer< TKey >? keyComparer,
IEqualityComparer< TValue >? valueComparer )
inlinestatic
Type Constraints
TKey :notnull 

Definition at line 92 of file ImmutableDictionary.cs.

92 : notnull
93 {
94 Requires.NotNull(source, "source");
96 {
97 return immutableDictionary.WithComparers(keyComparer, valueComparer);
98 }
99 return ImmutableDictionary<TKey, TValue>.Empty.WithComparers(keyComparer, valueComparer).AddRange(source);
100 }
void AddRange(IEnumerable< KeyValuePair< TKey, TValue > > collection)

References System.Collections.Generic.Dictionary< TKey, TValue >.AddRange(), and System.source.