diff --git a/src/LinkDotNet.StringBuilder/LinkDotNet.StringBuilder.csproj b/src/LinkDotNet.StringBuilder/LinkDotNet.StringBuilder.csproj index 6486831..375d40c 100644 --- a/src/LinkDotNet.StringBuilder/LinkDotNet.StringBuilder.csproj +++ b/src/LinkDotNet.StringBuilder/LinkDotNet.StringBuilder.csproj @@ -42,7 +42,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/LinkDotNet.StringBuilder/ValueStringBuilder.Replace.cs b/src/LinkDotNet.StringBuilder/ValueStringBuilder.Replace.cs index ebf41f6..3eec46d 100644 --- a/src/LinkDotNet.StringBuilder/ValueStringBuilder.Replace.cs +++ b/src/LinkDotNet.StringBuilder/ValueStringBuilder.Replace.cs @@ -24,7 +24,7 @@ public ref partial struct ValueStringBuilder public readonly void Replace(char oldValue, char newValue, int startIndex, int count) { ArgumentOutOfRangeException.ThrowIfLessThan(startIndex, 0); - ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex + count, Length); + ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex + count, Length, nameof(count)); buffer.Slice(startIndex, count).Replace(oldValue, newValue); } @@ -84,7 +84,7 @@ public void Replace(scoped ReadOnlySpan oldValue, scoped ReadOnlySpan oldValue, scoped ReadOnlySpan newValue, int startIndex, int count) { ArgumentOutOfRangeException.ThrowIfLessThan(startIndex, 0); - ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex + count, Length); + ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex + count, Length, nameof(count)); if (oldValue.IsEmpty || oldValue.Equals(newValue, StringComparison.Ordinal)) { diff --git a/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs b/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs index d48869c..9ae997c 100644 --- a/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs +++ b/src/LinkDotNet.StringBuilder/ValueStringBuilder.cs @@ -244,7 +244,7 @@ public void Remove(int startIndex, int length) { ArgumentOutOfRangeException.ThrowIfLessThan(length, 0); ArgumentOutOfRangeException.ThrowIfLessThan(startIndex, 0); - ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex + length, Length); + ArgumentOutOfRangeException.ThrowIfGreaterThan(startIndex + length, Length, nameof(length)); if (length == 0) {