Skip to content

Commit f0de0d5

Browse files
Updated readme and extensions.
1 parent df452a7 commit f0de0d5

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

OnixLabs.Core/Extensions.Array.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ public static class ArrayExtensions
5656
/// <summary>
5757
/// Provides extension methods for <see cref="byte"/> arrays.
5858
/// </summary>
59-
/// <param name="array">The current <see cref="byte"/> array.</param>
60-
extension(byte[] array)
59+
/// <param name="receiver">The current <see cref="byte"/> array.</param>
60+
extension(byte[] receiver)
6161
{
6262
/// <summary>
6363
/// Obtains the <see cref="string"/> representation of the current <see cref="byte"/> array.
6464
/// </summary>
6565
/// <param name="encoding">The <see cref="Encoding"/> which will be used to convert the current <see cref="byte"/> array into a <see cref="string"/> representation.</param>
6666
/// <returns>Returns the <see cref="string"/> representation of the current <see cref="byte"/> array.</returns>
67-
public string ToString(Encoding encoding) => encoding.GetString(array);
67+
public string ToString(Encoding encoding) => encoding.GetString(receiver);
6868
}
6969
}

OnixLabs.Core/Extensions.Random.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ public static class RandomExtensions
2727
/// <summary>
2828
/// Provides extension methods for <see cref="Random"/> instances.
2929
/// </summary>
30-
/// <param name="random">The current <see cref="Random"/> instance.</param>
31-
extension(Random random)
30+
/// <param name="receiver">The current <see cref="Random"/> instance.</param>
31+
extension(Random receiver)
3232
{
3333
/// <summary>
3434
/// Obtains a random element from the specified <see cref="IReadOnlyList{T}"/> items.
3535
/// </summary>
3636
/// <param name="items">The <see cref="IReadOnlyList{T}"/> items from which to obtain a random element.</param>
3737
/// <typeparam name="T">The underlying type of the <see cref="IReadOnlyList{T}"/> collection.</typeparam>
3838
/// <returns>Returns a random element from the specified <see cref="IReadOnlyList{T}"/> items.</returns>
39-
public T Next<T>(IReadOnlyList<T> items) => items[random.Next(0, items.Count)];
39+
public T Next<T>(IReadOnlyList<T> items) => items[receiver.Next(0, items.Count)];
4040
}
4141
}

OnixLabs.Core/Extensions.ReadOnlySequence.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ public static class ReadOnlySequenceExtensions
2626
/// <summary>
2727
/// Provides extension methods for <see cref="ReadOnlySequence{T}"/> instances.
2828
/// </summary>
29-
/// <param name="sequence">The current <see cref="ReadOnlySequence{T}"/> instance.</param>
29+
/// <param name="receiver">The current <see cref="ReadOnlySequence{T}"/> instance.</param>
3030
/// <typeparam name="T">The underlying type of the current <see cref="ReadOnlySequence{T}"/> instance.</typeparam>
31-
extension<T>(ReadOnlySequence<T> sequence)
31+
extension<T>(ReadOnlySequence<T> receiver)
3232
{
3333
/// <summary>
3434
/// Copies the current <see cref="ReadOnlySequence{T}"/> to the specified <typeparamref name="T"/> array.
3535
/// </summary>
3636
/// <param name="array">The <typeparamref name="T"/> array to copy in to.</param>
3737
public void CopyTo(out T[] array)
3838
{
39-
if (sequence.IsSingleSegment)
40-
array = sequence.First.Span.ToArray();
39+
if (receiver.IsSingleSegment)
40+
array = receiver.First.Span.ToArray();
4141
else
4242
{
4343
// ReSharper disable once HeapView.ObjectAllocation.Evident
44-
array = new T[sequence.Length];
45-
sequence.CopyTo(array);
44+
array = new T[receiver.Length];
45+
receiver.CopyTo(array);
4646
}
4747
}
4848
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![ONIX Labs](https://raw.githubusercontent.com/onix-labs/onixlabs-website/main/src/assets/images/logo/full/original/original-md.png)
1+
![ONIX Labs](https://raw.githubusercontent.com/onix-labs/onixlabs-website/refs/heads/main/OnixLabs.Web/wwwroot/onixlabs/images/logo/logo-full-light.svg)
22

33
# ONIXLabs .NET Library
44

0 commit comments

Comments
 (0)