File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ public void ContainerShouldDisposeSingletons()
176176 }
177177
178178 /// <summary>
179- /// Shoulds the be thread safe.
179+ /// Should be thread safe.
180180 /// </summary>
181181 [ TestMethod ]
182182 public void ShouldBeThreadSafe ( )
Original file line number Diff line number Diff line change @@ -275,6 +275,23 @@ public void Push(int value)
275275 Add ( value ) ;
276276 }
277277
278+ /// <summary>
279+ /// Pushes the range.
280+ /// </summary>
281+ /// <param name="values">The values.</param>
282+ public void PushRange ( ReadOnlySpan < int > values )
283+ {
284+ if ( values . IsEmpty ) return ;
285+
286+ int count = values . Length ;
287+ EnsureCapacity ( Length + count ) ;
288+
289+ // Copy the entire span directly into the unmanaged buffer
290+ values . CopyTo ( new Span < int > ( _ptr + Length , count ) ) ;
291+ Length += count ;
292+ }
293+
294+
278295 /// <summary>
279296 /// Adds an integer value to the end of the list, resizing if necessary.
280297 /// </summary>
You can’t perform that action at this time.
0 commit comments