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

◆ ToLookup< TSource, TKey >() [2/2]

static ILookup< TKey, TSource > System.Linq.ParallelEnumerable.ToLookup< TSource, TKey > ( this ParallelQuery< TSource > source,
Func< TSource, TKey > keySelector,
IEqualityComparer< TKey >? comparer )
inlinestatic
Type Constraints
TKey :notnull 

Definition at line 1851 of file ParallelEnumerable.cs.

1851 : notnull
1852 {
1853 if (source == null)
1854 {
1855 throw new ArgumentNullException("source");
1856 }
1857 if (keySelector == null)
1858 {
1859 throw new ArgumentNullException("keySelector");
1860 }
1863 System.Linq.Parallel.Lookup<TKey, TSource> lookup = new System.Linq.Parallel.Lookup<TKey, TSource>(comparer);
1865 using (enumerator)
1866 {
1867 while (enumerator.MoveNext())
1868 {
1869 lookup.Add(enumerator.Current);
1870 }
1871 return lookup;
1872 }
1873 }
void Add(TKey key, TValue value)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.comparer, System.Collections.Generic.Dictionary< TKey, TValue >.GetEnumerator(), System.Linq.keySelector, and System.Linq.source.