Validator.TryValidatePropertyAsync Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
[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)
Paramètres
- value
- Object
- validationContext
- ValidationContext
- validationResults
- ICollection<ValidationResult>
- cancellationToken
- CancellationToken
Retours
- Attributs