Skip to content

Commit c5a5d5d

Browse files
committed
Fixed build error due to StyleCop
1 parent 93018fa commit c5a5d5d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Microsoft.Toolkit.Mvvm/ComponentModel/ObservableValidator.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ private void ValidateProperty(object? value, string? propertyName)
253253
{
254254
if (propertyName is null)
255255
{
256+
static void ThrowArgumentNullExceptionForNullPropertyName()
257+
{
258+
throw new ArgumentNullException(nameof(propertyName), "The input property name cannot be null when validating a property");
259+
}
260+
256261
ThrowArgumentNullExceptionForNullPropertyName();
257262
}
258263

@@ -291,13 +296,5 @@ private void ValidateProperty(object? value, string? propertyName)
291296
ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
292297
}
293298
}
294-
295-
/// <summary>
296-
/// Throws an <see cref="ArgumentNullException"/> when a property name given as input is <see langword="null"/>.
297-
/// </summary>
298-
private static void ThrowArgumentNullExceptionForNullPropertyName()
299-
{
300-
throw new ArgumentNullException("propertyName", "The input property name cannot be null when validating a property");
301-
}
302299
}
303300
}

0 commit comments

Comments
 (0)