From 8f5a2577182d7409f9d3653f8c91585df04f34e6 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Thu, 16 May 2019 20:15:05 -0700 Subject: [PATCH] Correcting documentation for span and memory slice (dotnet/coreclr#24612) Commit migrated from https://github.com/dotnet/coreclr/commit/782585efa2d83731c10a45fc2e55bc41e1843f8b --- src/libraries/System.Private.CoreLib/src/System/Memory.cs | 6 +++--- .../System.Private.CoreLib/src/System/MemoryExtensions.cs | 14 +++++++------- .../System.Private.CoreLib/src/System/ReadOnlyMemory.cs | 6 +++--- .../System.Private.CoreLib/src/System/ReadOnlySpan.Fast.cs | 6 +++--- .../System.Private.CoreLib/src/System/Span.Fast.cs | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Memory.cs b/src/libraries/System.Private.CoreLib/src/System/Memory.cs index c492e6e..54f0147 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Memory.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Memory.cs @@ -92,7 +92,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=Length). + /// Thrown when the specified or end index is not in the range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Memory(T[]? array, int start, int length) @@ -243,7 +243,7 @@ namespace System /// /// The index at which to begin this slice. /// - /// Thrown when the specified index is not in range (<0 or >=Length). + /// Thrown when the specified index is not in range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Memory Slice(int start) @@ -263,7 +263,7 @@ namespace System /// The index at which to begin this slice. /// The desired length for the slice (exclusive). /// - /// Thrown when the specified or end index is not in range (<0 or >=Length). + /// Thrown when the specified or end index is not in range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Memory Slice(int start, int length) diff --git a/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs index 5af2b0d..b9824e2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MemoryExtensions.cs @@ -996,7 +996,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=Length). + /// Thrown when the specified or end index is not in the range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span AsSpan(this T[]? array, int start, int length) @@ -1022,7 +1022,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=segment.Count). + /// Thrown when the specified or end index is not in the range (<0 or >segment.Count). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span AsSpan(this ArraySegment segment, int start) @@ -1056,7 +1056,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=segment.Count). + /// Thrown when the specified or end index is not in the range (<0 or >segment.Count). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span AsSpan(this ArraySegment segment, int start, int length) @@ -1095,7 +1095,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=array.Length). + /// Thrown when the specified or end index is not in the range (<0 or >array.Length). /// public static Memory AsMemory(this T[]? array, int start) => new Memory(array, start); @@ -1127,7 +1127,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=Length). + /// Thrown when the specified or end index is not in the range (<0 or >Length). /// public static Memory AsMemory(this T[]? array, int start, int length) => new Memory(array, start, length); @@ -1165,7 +1165,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=segment.Count). + /// Thrown when the specified or end index is not in the range (<0 or >segment.Count). /// public static Memory AsMemory(this ArraySegment segment, int start) { @@ -1185,7 +1185,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=segment.Count). + /// Thrown when the specified or end index is not in the range (<0 or >segment.Count). /// public static Memory AsMemory(this ArraySegment segment, int start, int length) { diff --git a/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs b/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs index 95134ad..4a22075 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs @@ -72,7 +72,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=Length). + /// Thrown when the specified or end index is not in the range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlyMemory(T[]? array, int start, int length) @@ -172,7 +172,7 @@ namespace System /// /// The index at which to begin this slice. /// - /// Thrown when the specified index is not in range (<0 or >=Length). + /// Thrown when the specified index is not in range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlyMemory Slice(int start) @@ -192,7 +192,7 @@ namespace System /// The index at which to begin this slice. /// The desired length for the slice (exclusive). /// - /// Thrown when the specified or end index is not in range (<0 or >=Length). + /// Thrown when the specified or end index is not in range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlyMemory Slice(int start, int length) diff --git a/src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.Fast.cs b/src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.Fast.cs index d7e8c4f..8a5b7e7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.Fast.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ReadOnlySpan.Fast.cs @@ -62,7 +62,7 @@ namespace System /// The number of items in the read-only span. /// Returns default when is null. /// - /// Thrown when the specified or end index is not in the range (<0 or >=Length). + /// Thrown when the specified or end index is not in the range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlySpan(T[]? array, int start, int length) @@ -246,7 +246,7 @@ namespace System /// /// The index at which to begin this slice. /// - /// Thrown when the specified index is not in range (<0 or >=Length). + /// Thrown when the specified index is not in range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlySpan Slice(int start) @@ -263,7 +263,7 @@ namespace System /// The index at which to begin this slice. /// The desired length for the slice (exclusive). /// - /// Thrown when the specified or end index is not in range (<0 or >=Length). + /// Thrown when the specified or end index is not in range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlySpan Slice(int start, int length) diff --git a/src/libraries/System.Private.CoreLib/src/System/Span.Fast.cs b/src/libraries/System.Private.CoreLib/src/System/Span.Fast.cs index 94c6e06..456e1ec 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Span.Fast.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Span.Fast.cs @@ -66,7 +66,7 @@ namespace System /// Returns default when is null. /// Thrown when is covariant and array's type is not exactly T[]. /// - /// Thrown when the specified or end index is not in the range (<0 or >=Length). + /// Thrown when the specified or end index is not in the range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Span(T[]? array, int start, int length) @@ -325,7 +325,7 @@ namespace System /// /// The index at which to begin this slice. /// - /// Thrown when the specified index is not in range (<0 or >=Length). + /// Thrown when the specified index is not in range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Span Slice(int start) @@ -342,7 +342,7 @@ namespace System /// The index at which to begin this slice. /// The desired length for the slice (exclusive). /// - /// Thrown when the specified or end index is not in range (<0 or >=Length). + /// Thrown when the specified or end index is not in range (<0 or >Length). /// [MethodImpl(MethodImplOptions.AggressiveInlining)] public Span Slice(int start, int length) -- 2.7.4