Jezik

Validator.TryValidatePropertyAsync Method

Definition

[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of validationContext.ObjectType cannot be statically discovered.")]
public static System.Threading.Tasks.Task<bool> TryValidatePropertyAsync(object? value, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Collections.Generic.ICollection<System.ComponentModel.DataAnnotations.ValidationResult>? validationResults, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of validationContext.ObjectType cannot be statically discovered.")>]
static member TryValidatePropertyAsync : obj * System.ComponentModel.DataAnnotations.ValidationContext * System.Collections.Generic.ICollection<System.ComponentModel.DataAnnotations.ValidationResult> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Shared Function TryValidatePropertyAsync (value As Object, validationContext As ValidationContext, validationResults As ICollection(Of ValidationResult), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

value
Object
validationContext
ValidationContext
validationResults
ICollection<ValidationResult>
cancellationToken
CancellationToken

Returns

Attributes

Applies to