Skip to content

Commit d795be5

Browse files
author
LoneWandererProductions
committed
sync back some changes.
1 parent 8cd1bad commit d795be5

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

CoreBuilderTests/CoreInjectorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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()

ExtendedSystemObjects/UnmanagedIntList.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)