Validator.ValidateObjectAsync Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Přetížení
| Name | Description |
|---|---|
| ValidateObjectAsync(Object, ValidationContext, CancellationToken) | |
| ValidateObjectAsync(Object, ValidationContext, Boolean, CancellationToken) |
ValidateObjectAsync(Object, ValidationContext, CancellationToken)
- Zdroj:
- Validator.cs
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")]
public static System.Threading.Tasks.Task ValidateObjectAsync(object instance, System.ComponentModel.DataAnnotations.ValidationContext validationContext, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")>]
static member ValidateObjectAsync : obj * System.ComponentModel.DataAnnotations.ValidationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function ValidateObjectAsync (instance As Object, validationContext As ValidationContext, Optional cancellationToken As CancellationToken = Nothing) As Task
Parametry
- instance
- Object
- validationContext
- ValidationContext
- cancellationToken
- CancellationToken
Návraty
- Atributy
Platí pro
ValidateObjectAsync(Object, ValidationContext, Boolean, CancellationToken)
- Zdroj:
- Validator.cs
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")]
public static System.Threading.Tasks.Task ValidateObjectAsync(object instance, System.ComponentModel.DataAnnotations.ValidationContext validationContext, bool validateAllProperties, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Constructing a ValidationContext without a display name is not trim-safe because it uses reflection to discover the type of the instance being validated in order to resolve the DisplayNameAttribute when a display name is not provided.")>]
static member ValidateObjectAsync : obj * System.ComponentModel.DataAnnotations.ValidationContext * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function ValidateObjectAsync (instance As Object, validationContext As ValidationContext, validateAllProperties As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task
Parametry
- instance
- Object
- validationContext
- ValidationContext
- validateAllProperties
- Boolean
- cancellationToken
- CancellationToken
Návraty
- Atributy