Skip to content

Commit 321fc50

Browse files
committed
Switch __ObservableValidatorHelper to [UnconditionalSuppressMessage]
1 parent c80930f commit 321fc50

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CommunityToolkit.Mvvm/ComponentModel/__Internals/__ObservableValidatorHelper.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ public static class __ObservableValidatorHelper
2424
/// <param name="propertyName">The name of the property to validate.</param>
2525
[EditorBrowsable(EditorBrowsableState.Never)]
2626
[Obsolete("This method is not intended to be called directly by user code")]
27-
[RequiresUnreferencedCode("The type of the current instance cannot be statically discovered.")]
27+
[UnconditionalSuppressMessage(
28+
"ReflectionAnalysis",
29+
"IL2026:RequiresUnreferencedCode",
30+
Justification = "This helper is called by generated code from public APIs that have the proper annotations already (and we don't want generated code to produce warnings that developers cannot fix).")]
2831
public static void ValidateProperty(ObservableValidator instance, object? value, string propertyName)
2932
{
3033
instance.ValidateProperty(value, propertyName);

0 commit comments

Comments
 (0)