RecyclableList<T>.RecyclableListHelpers renamed to RecyclableList<T>.Helpers
This commit is contained in:
1 parent
9afa16c9c3
commit
d465029358
5 files changed
+11
-11
No files matched your search
@@ -4,7 +4,7 @@ namespace Recyclable.Collections
|
|||||||
{
|
{
|
||||||
public partial class RecyclableList<T>
|
public partial class RecyclableList<T>
|
||||||
{
|
{
|
||||||
internal static class RecyclableListHelpers
|
internal static class Helpers
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static bool Contains(RecyclableList<T[]> arrays, T item) => arrays.Any(x => x.Contains(item));
|
public static bool Contains(RecyclableList<T[]> arrays, T item) => arrays.Any(x => x.Contains(item));
|
||||||
|
|||||||
@@ -171,13 +171,13 @@ namespace Recyclable.Collections
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Contains(T item) => RecyclableList<T>.RecyclableListHelpers.Contains(Memory, item);
|
public bool Contains(T item) => RecyclableList<T>.Helpers.Contains(Memory, item);
|
||||||
public void CopyTo(T[] array, int arrayIndex) => RecyclableList<T>.RecyclableListHelpers.CopyTo(Memory, RemovedCount, BlockSize, (int)(LongCount % BlockSize), array, arrayIndex);
|
public void CopyTo(T[] array, int arrayIndex) => RecyclableList<T>.Helpers.CopyTo(Memory, RemovedCount, BlockSize, (int)(LongCount % BlockSize), array, arrayIndex);
|
||||||
public IEnumerable<T> Enumerate() => RecyclableList<T>.RecyclableListHelpers.Enumerate(Memory, BlockSize, LongCount);
|
public IEnumerable<T> Enumerate() => RecyclableList<T>.Helpers.Enumerate(Memory, BlockSize, LongCount);
|
||||||
public IEnumerator<T> GetEnumerator() => RecyclableList<T>.RecyclableListHelpers.Enumerate(Memory, BlockSize, LongCount).GetEnumerator();
|
public IEnumerator<T> GetEnumerator() => RecyclableList<T>.Helpers.Enumerate(Memory, BlockSize, LongCount).GetEnumerator();
|
||||||
IEnumerator IEnumerable.GetEnumerator() => RecyclableList<T>.RecyclableListHelpers.Enumerate(Memory, BlockSize, LongCount).GetEnumerator();
|
IEnumerator IEnumerable.GetEnumerator() => RecyclableList<T>.Helpers.Enumerate(Memory, BlockSize, LongCount).GetEnumerator();
|
||||||
public int IndexOf(T item) => (int)GetRelativeIndex(RecyclableList<T>.RecyclableListHelpers.LongIndexOf(Memory, BlockSize, item, _equalityComparer));
|
public int IndexOf(T item) => (int)GetRelativeIndex(RecyclableList<T>.Helpers.LongIndexOf(Memory, BlockSize, item, _equalityComparer));
|
||||||
public long LongIndexOf(T item) => GetRelativeIndex(RecyclableList<T>.RecyclableListHelpers.LongIndexOf(Memory, BlockSize, item, _equalityComparer));
|
public long LongIndexOf(T item) => GetRelativeIndex(RecyclableList<T>.Helpers.LongIndexOf(Memory, BlockSize, item, _equalityComparer));
|
||||||
public void Insert(int index, T item) => throw new NotSupportedException();
|
public void Insert(int index, T item) => throw new NotSupportedException();
|
||||||
public void RemoveAt(int index) => throw new NotSupportedException();
|
public void RemoveAt(int index) => throw new NotSupportedException();
|
||||||
public bool TryDequeue(out T? item) => TryDequeue(this, out item);
|
public bool TryDequeue(out T? item) => TryDequeue(this, out item);
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
BeginUpdate();
|
BeginUpdate();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
RecyclableList<(TKey Key, TValue Value)>.RecyclableListHelpers.QuickSort(this, _comparer, _randomNumberGenerator);
|
RecyclableList<(TKey Key, TValue Value)>.Helpers.QuickSort(this, _comparer, _randomNumberGenerator);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ namespace Recyclable.CollectionsTests
|
|||||||
|
|
||||||
// Act
|
// Act
|
||||||
using RecyclableList<long> list = new(testData);
|
using RecyclableList<long> list = new(testData);
|
||||||
RecyclableList<long>.RecyclableListHelpers.QuickSort(list);
|
RecyclableList<long>.Helpers.QuickSort(list);
|
||||||
|
|
||||||
// Validate
|
// Validate
|
||||||
_ = list.Count.Should().Be((int)itemsCount);
|
_ = list.Count.Should().Be((int)itemsCount);
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ namespace Recyclable.CollectionsTests
|
|||||||
|
|
||||||
// Act
|
// Act
|
||||||
using RecyclableLongList<long> list = new(testData, minBlockSize: targetBlockSize);
|
using RecyclableLongList<long> list = new(testData, minBlockSize: targetBlockSize);
|
||||||
RecyclableList<long>.RecyclableListHelpers.QuickSort(list);
|
RecyclableList<long>.Helpers.QuickSort(list);
|
||||||
|
|
||||||
// Validate
|
// Validate
|
||||||
_ = list.LongCount.Should().Be(itemsCount);
|
_ = list.LongCount.Should().Be(itemsCount);
|
||||||
|
|||||||
Reference in new issue
Block a user