44
55namespace Netly
66{
7- public static class NUtils
7+ public static class NHelper
88 {
99 /// <summary>
10- /// Returns a new <see cref="ArraySegment{T}"/> shifted by the specified number of elements.
11- /// If the shift is greater than or equal to the segment count, an empty segment at the end is returned.
10+ /// Returns a new <see cref="ArraySegment{T}" /> shifted by the specified number of elements.
11+ /// If the shift is greater than or equal to the segment count, an empty segment at the end is returned.
1212 /// </summary>
1313 /// <typeparam name="T">The type of elements in the array segment.</typeparam>
1414 /// <param name="segment">The original array segment.</param>
1515 /// <param name="shift">The number of elements to skip from the start.</param>
1616 /// <returns>A new array segment representing the shifted portion.</returns>
17- /// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="shift"/> is negative.</exception>
18- /// <exception cref="ArgumentNullException">Thrown if the array in <paramref name="segment"/> is null.</exception>
17+ /// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="shift" /> is negative.</exception>
18+ /// <exception cref="ArgumentNullException">Thrown if the array in <paramref name="segment" /> is null.</exception>
1919 public static ArraySegment < T > SegmentShift < T > ( ArraySegment < T > segment , int shift )
2020 {
2121 if ( shift < 0 )
@@ -30,15 +30,15 @@ public static ArraySegment<T> SegmentShift<T>(ArraySegment<T> segment, int shift
3030 }
3131
3232 /// <summary>
33- /// Compares all elements in the given array to determine if they are equal.
34- /// For arrays with more than one element, returns true if all elements are the same.
33+ /// Compares all elements in the given array to determine if they are equal.
34+ /// For arrays with more than one element, returns true if all elements are the same.
3535 /// </summary>
3636 /// <typeparam name="T">The type of elements in the array. Must support equality comparison.</typeparam>
3737 /// <param name="array">The array of elements to compare.</param>
3838 /// <returns>
39- /// True if all elements are equal or the array has zero or one element; otherwise, false.
39+ /// True if all elements are equal or the array has zero or one element; otherwise, false.
4040 /// </returns>
41- /// <exception cref="ArgumentNullException">Thrown if <paramref name="array"/> is null.</exception>
41+ /// <exception cref="ArgumentNullException">Thrown if <paramref name="array" /> is null.</exception>
4242 public static bool ArraySequenced < T > ( params T [ ] [ ] array )
4343 {
4444 if ( array == null )
@@ -57,7 +57,7 @@ public static bool ArraySequenced<T>(params T[][] array)
5757 }
5858
5959 /// <summary>
60- /// Returns a string representation of an array in the format [elem1,elem2,...].
60+ /// Returns a string representation of an array in the format [elem1,elem2,...].
6161 /// </summary>
6262 /// <typeparam name="T">The type of elements in the array.</typeparam>
6363 /// <param name="elements">The array to format.</param>
@@ -68,13 +68,13 @@ public static string Format<T>(T[] elements)
6868 }
6969
7070 /// <summary>
71- /// Concatenates all elements of the given array into a new array.
72- /// This is mainly useful if you want a copy of the array or to combine multiple arrays later.
71+ /// Concatenates all elements of the given array into a new array.
72+ /// This is mainly useful if you want a copy of the array or to combine multiple arrays later.
7373 /// </summary>
7474 /// <typeparam name="T">The type of elements in the array.</typeparam>
7575 /// <param name="elements">The array of elements to concatenate.</param>
7676 /// <returns>A new array containing all elements from the input array in order.</returns>
77- /// <exception cref="ArgumentNullException">Thrown if <paramref name="elements"/> is null.</exception>
77+ /// <exception cref="ArgumentNullException">Thrown if <paramref name="elements" /> is null.</exception>
7878 public static T [ ] ArrayConcat < T > ( params T [ ] [ ] elements )
7979 {
8080 if ( elements == null )
@@ -99,7 +99,7 @@ public static T[] ArrayConcat<T>(params T[][] elements)
9999 /// Throws <see cref="InternalBufferOverflowException" /> if the size exceeds the default maximum.
100100 /// </summary>
101101 /// <param name="size">The desired size of the stream.</param>
102- /// <returns>A <see cref="Stream"/> with the specified size.</returns>
102+ /// <returns>A <see cref="Stream" /> with the specified size.</returns>
103103 public static Stream NewStream ( long size )
104104 {
105105 if ( size <= 1024 * 1024 * 20 ) // 20.00 MB
0 commit comments