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

◆ BuildKeysFromSource()

void System.Linq.Parallel.SortHelper< TInputOutput, TKey >.BuildKeysFromSource ( ref GrowingArray< TKey > keys,
ref List< TInputOutput > values )
inlineprivate

Definition at line 111 of file SortHelper.cs.

112 {
115 try
116 {
118 TKey currentKey = default(TKey);
119 bool flag = _source.MoveNext(ref currentElement, ref currentKey);
120 if (keys == null)
121 {
122 keys = new GrowingArray<TKey>();
123 }
124 if (!flag)
125 {
126 return;
127 }
128 int num = 0;
129 do
130 {
131 if ((num++ & 0x3F) == 0)
132 {
133 mergedCancellationToken.ThrowIfCancellationRequested();
134 }
135 keys.Add(currentKey);
137 }
138 while (_source.MoveNext(ref currentElement, ref currentKey));
139 }
140 finally
141 {
143 }
144 }
void Add(TKey key, TValue value)
bool MoveNext([MaybeNullWhen(false)][AllowNull] ref TElement currentElement, [AllowNull] ref TKey currentKey)
readonly QueryOperatorEnumerator< TInputOutput, TKey > _source
Definition SortHelper.cs:12
readonly QueryTaskGroupState _groupState
Definition SortHelper.cs:18

References System.Linq.Parallel.SortHelper< TInputOutput, TKey >._groupState, System.Linq.Parallel.SortHelper< TInputOutput, TKey >._source, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Linq.Parallel.QueryTaskGroupState.CancellationState, System.Linq.Parallel.QueryOperatorEnumerator< TElement, TKey >.Dispose(), System.keys, System.Linq.Parallel.CancellationState.MergedCancellationToken, System.Linq.Parallel.QueryOperatorEnumerator< TElement, TKey >.MoveNext(), and System.values.

Referenced by System.Linq.Parallel.SortHelper< TInputOutput, TKey >.Sort().