Validator.ValidateObjectAsync Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Overloads
| Name | Description |
|---|---|
| ValidateObjectAsync(Object, ValidationContext, CancellationToken) | |
| ValidateObjectAsync(Object, ValidationContext, Boolean, CancellationToken) |
ValidateObjectAsync(Object, ValidationContext, CancellationToken)
- Bron:
- 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
Parameters
- instance
- Object
- validationContext
- ValidationContext
- cancellationToken
- CancellationToken
Retouren
- Kenmerken
Van toepassing op
ValidateObjectAsync(Object, ValidationContext, Boolean, CancellationToken)
- Bron:
- 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
Parameters
- instance
- Object
- validationContext
- ValidationContext
- validateAllProperties
- Boolean
- cancellationToken
- CancellationToken
Retouren
- Kenmerken