Skip to content

Commit 0f2d23b

Browse files
Removed args parameter from internal guard function
1 parent f3a95ae commit 0f2d23b

File tree

1 file changed

+2
-3
lines changed
  • src/DotNetToolkit.Repository/Utility

1 file changed

+2
-3
lines changed

src/DotNetToolkit.Repository/Utility/Guard.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System;
66
using System.Collections.Generic;
77
using System.Diagnostics;
8-
using System.Globalization;
98

109
/// <summary>
1110
/// Utility class to do <c>null</c> and other checks.
@@ -73,14 +72,14 @@ public static ICollection<T> NotEmpty<T>([ValidatedNotNull] [NoEnumeration] ICol
7372

7473
[NotNull]
7574
[ContractAnnotation("value:null => halt")]
76-
public static T EnsureNotNull<T>([ValidatedNotNull] [NoEnumeration] T value, string message, params object[] args) where T : class
75+
public static T EnsureNotNull<T>([ValidatedNotNull] [NoEnumeration] T value, string message) where T : class
7776
{
7877
#if NETSTANDARD2_0
7978
if (typeof(T).IsNullableType() && value == null)
8079
#else
8180
if (ReferenceEquals(value, null))
8281
#endif
83-
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, message, args));
82+
throw new InvalidOperationException(message);
8483

8584
return value;
8685
}

0 commit comments

Comments
 (0)