1
0
mirror of https://github.com/chylex/.NET-Community-Toolkit.git synced 2025-06-02 05:34:09 +02:00
.NET-Community-Toolkit/CommunityToolkit.Mvvm/ComponentModel/__Internals/__ObservableValidatorHelper.cs
Sergio Pedri 51c7a67c20 More code style improvements and tweaks
- Remove unused namespaces
- Remove unused attributes
- Remove unnecessary #nullable enable directives
- Sort using directives
- Simplify names
2021-11-01 22:29:46 +01:00

31 lines
1.4 KiB
C#

// 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;
namespace CommunityToolkit.Mvvm.ComponentModel.__Internals;
/// <summary>
/// An internal helper to support the source generator APIs related to <see cref="ObservableValidator"/>.
/// This type is not intended to be used directly by user code.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This type is not intended to be used directly by user code")]
public static class __ObservableValidatorHelper
{
/// <summary>
/// Invokes <see cref="ObservableValidator.ValidateProperty(object?, string?)"/> externally on a target instance.
/// </summary>
/// <param name="instance">The target <see cref="ObservableValidator"/> instance.</param>
/// <param name="value">The value to test for the specified property.</param>
/// <param name="propertyName">The name of the property to validate.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This method is not intended to be called directly by user code")]
public static void ValidateProperty(ObservableValidator instance, object? value, string propertyName)
{
instance.ValidateProperty(value, propertyName);
}
}