Skip to content

Commit

Permalink
Update for Guard Against StringLength (#343)
Browse files Browse the repository at this point in the history
* Update GuardAgainstStringLengthExtensions.cs

Namespace and Maxmimum typo

* Remove using statement
  • Loading branch information
rlarno committed Feb 26, 2024
1 parent 901616c commit 76a6a4d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/GuardClauses/GuardAgainstStringLengthExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using Ardalis.GuardClauses;

namespace GuardClauses;
namespace Ardalis.GuardClauses;

/// <summary>
/// The class containing extension methods for <see cref="IGuardClause"/>
Expand Down Expand Up @@ -53,7 +52,7 @@ public static partial class GuardClauseExtensions
Guard.Against.NegativeOrZero(maxLength, nameof(maxLength));
if (input.Length > maxLength)
{
throw new ArgumentException(message ?? $"Input {parameterName} with length {input.Length} is too long. Maxmimum length is {maxLength}.", parameterName);
throw new ArgumentException(message ?? $"Input {parameterName} with length {input.Length} is too long. Maximum length is {maxLength}.", parameterName);
}
return input;
}
Expand Down

0 comments on commit 76a6a4d

Please sign in to comment.