Skip to content

Commit 67951fb

Browse files
committed
Refine xml-comments
1 parent 4ba6afb commit 67951fb

2 files changed

Lines changed: 21 additions & 16 deletions

File tree

Ramstack.Structures/Collections/ArrayViewExtensions.cs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,37 @@ public static class ArrayViewExtensions
88
/// <summary>
99
/// Creates a new <see cref="ArrayView{T}"/> over an array.
1010
/// </summary>
11+
/// <typeparam name="T">The type of elements in the array.</typeparam>
1112
/// <param name="value">The target array.</param>
1213
/// <returns>
13-
/// An <see cref="ArrayView{T}"/> representing the array.
14+
/// An <see cref="ArrayView{T}"/> representing the specified array.
1415
/// </returns>
1516
public static ArrayView<T> AsView<T>(this T[]? value) =>
1617
new(value ?? []);
1718

1819
/// <summary>
19-
/// Creates a new <see cref="ArrayView{T}"/> over a portion of the target array from a specified position to the end of the array.
20+
/// Creates a new <see cref="ArrayView{T}"/> over a portion of the specified array,
21+
/// starting at a specified position to the end of the array.
2022
/// </summary>
21-
/// <param name="value">The target array.</param>
22-
/// <param name="index">The index at which to begin the array view.</param>
23+
/// <typeparam name="T">The type of elements in the array.</typeparam>
24+
/// <param name="value">The array to create a view over.</param>
25+
/// <param name="index">The zero-based starting position of the view in the array.</param>
2326
/// <returns>
24-
/// An <see cref="ArrayView{T}"/> representing the array.
27+
/// An <see cref="ArrayView{T}"/> representing the specified portion of the array.
2528
/// </returns>
2629
public static ArrayView<T> AsView<T>(this T[]? value, int index) =>
2730
new(value ?? [], index);
2831

2932
/// <summary>
30-
/// Creates a new <see cref="ArrayView{T}"/> over a portion of the target array from a specified position for a specified number of elements.
33+
/// Creates a new <see cref="ArrayView{T}"/> over a portion of the specified array
34+
/// starting at a specified position for a specified number of elements.
3135
/// </summary>
32-
/// <param name="value">The target array.</param>
33-
/// <param name="index">The index at which to begin the array view.</param>
34-
/// <param name="count">The number of items in the array view.</param>
36+
/// <typeparam name="T">The type of elements in the array.</typeparam>
37+
/// <param name="value">The array to create a view over. Can be null.</param>
38+
/// <param name="index">The zero-based starting position of the view in the array.</param>
39+
/// <param name="count">The number of elements to include in the view.</param>
3540
/// <returns>
36-
/// An <see cref="ArrayView{T}"/> representing the array.
41+
/// An <see cref="ArrayView{T}"/> representing the specified portion of the array.
3742
/// </returns>
3843
public static ArrayView<T> AsView<T>(this T[]? value, int index, int count) =>
3944
new(value ?? [], index, count);

Ramstack.Structures/Collections/ArrayView`1.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public ArrayView(T[] array)
5959
/// a view for the specified range of the elements in the specified array.
6060
/// </summary>
6161
/// <param name="array">The array to wrap.</param>
62-
/// <param name="index">The zero-based index of the first element in the range.</param>
62+
/// <param name="index">The zero-based starting position of the view in the array.</param>
6363
[MethodImpl(MethodImplOptions.AggressiveInlining)]
6464
public ArrayView(T[] array, int index)
6565
{
@@ -76,8 +76,8 @@ public ArrayView(T[] array, int index)
7676
/// a view for the specified range of the elements in the specified array.
7777
/// </summary>
7878
/// <param name="array">The array to wrap.</param>
79-
/// <param name="index">The zero-based index of the first element in the range.</param>
80-
/// <param name="length">The number of elements in the range.</param>
79+
/// <param name="index">The zero-based starting position of the view in the array.</param>
80+
/// <param name="length">The number of characters to include in the view.</param>
8181
[MethodImpl(MethodImplOptions.AggressiveInlining)]
8282
public ArrayView(T[] array, int index, int length)
8383
{
@@ -108,9 +108,9 @@ public ArrayView(T[] array, int index, int length)
108108
/// <paramref name="length"/> are within bounds).
109109
/// </remarks>
110110
/// <param name="array">The array to wrap.</param>
111-
/// <param name="index">The zero-based index of the first element in the range.</param>
112-
/// <param name="length">The number of elements in the range.</param>
113-
/// <param name="unused">Unused parameter, exists solely to disambiguate overloads.</param>
111+
/// <param name="index">The zero-based starting position of the view in the array.</param>
112+
/// <param name="length">The number of characters to include in the view.</param>
113+
/// <param name="unused">Unused parameter used only to differentiate between overloads.</param>
114114
[MethodImpl(MethodImplOptions.AggressiveInlining)]
115115
internal ArrayView(T[] array, int index, int length, int unused)
116116
{

0 commit comments

Comments
 (0)