// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; namespace CommunityToolkit.Mvvm.ComponentModel.__Internals; /// /// An internal helper to support the source generator APIs related to . /// This type is not intended to be used directly by user code. /// [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This type is not intended to be used directly by user code")] public static class __ObservableValidatorHelper { /// /// Invokes externally on a target instance. /// /// The target instance. /// The value to test for the specified property. /// The name of the property to validate. [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("This method is not intended to be called directly by user code")] [UnconditionalSuppressMessage( "ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", 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).")] public static void ValidateProperty(ObservableValidator instance, object? value, string propertyName) { instance.ValidateProperty(value, propertyName); } }