Validator.ValidateObjectAsync Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
| Nazwa | Opis |
|---|---|
| ValidateObjectAsync(Object, ValidationContext, CancellationToken) | |
| ValidateObjectAsync(Object, ValidationContext, Boolean, CancellationToken) |
ValidateObjectAsync(Object, ValidationContext, CancellationToken)
- Źródło:
- 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
Zwraca
- Atrybuty
Dotyczy
ValidateObjectAsync(Object, ValidationContext, Boolean, CancellationToken)
- Źródło:
- 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
Zwraca
- Atrybuty