csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.6 KiB
35 lines
1.6 KiB
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Avalonia.Data.Core.Plugins
|
|
{
|
|
/// <summary>
|
|
/// Defines how data validation is observed by an <see cref="ExpressionObserver"/>.
|
|
/// </summary>
|
|
public interface IDataValidationPlugin
|
|
{
|
|
/// <summary>
|
|
/// Checks whether this plugin can handle data validation on the specified object.
|
|
/// </summary>
|
|
/// <param name="reference">A weak reference to the object.</param>
|
|
/// <param name="memberName">The name of the member to validate.</param>
|
|
/// <returns>True if the plugin can handle the object; otherwise false.</returns>
|
|
[RequiresUnreferencedCode(TrimmingMessages.DataValidationPluginRequiresUnreferencedCodeMessage)]
|
|
bool Match(WeakReference<object?> reference, string memberName);
|
|
|
|
/// <summary>
|
|
/// Starts monitoring the data validation state of a property on an object.
|
|
/// </summary>
|
|
/// <param name="reference">A weak reference to the object.</param>
|
|
/// <param name="propertyName">The property name.</param>
|
|
/// <param name="inner">The inner property accessor used to access the property.</param>
|
|
/// <returns>
|
|
/// An <see cref="IPropertyAccessor"/> interface through which future interactions with the
|
|
/// property will be made.
|
|
/// </returns>
|
|
[RequiresUnreferencedCode(TrimmingMessages.DataValidationPluginRequiresUnreferencedCodeMessage)]
|
|
IPropertyAccessor Start(WeakReference<object?> reference,
|
|
string propertyName,
|
|
IPropertyAccessor inner);
|
|
}
|
|
}
|
|
|