DbDataReader.GetColumnSchemaAsync(CancellationToken) Méthode

Définition

Il s’agit de la version asynchrone de GetColumnSchema(DbDataReader). Les fournisseurs doivent remplacer par une implémentation appropriée. Le cancellationToken peut éventuellement être honoré. L’implémentation par défaut appelle l’appel synchrone GetColumnSchema(DbDataReader) et retourne une tâche terminée. L’implémentation par défaut retourne une tâche annulée en cas d’annulation d’une opération déjà annulée cancellationToken. Les exceptions levées par GetColumnSchema(DbDataReader) seront communiquées via la propriété Exception de tâche retournée.

public virtual System.Threading.Tasks.Task<System.Collections.ObjectModel.ReadOnlyCollection<System.Data.Common.DbColumn>> GetColumnSchemaAsync(System.Threading.CancellationToken cancellationToken = default);
abstract member GetColumnSchemaAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.ObjectModel.ReadOnlyCollection<System.Data.Common.DbColumn>>
override this.GetColumnSchemaAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.ObjectModel.ReadOnlyCollection<System.Data.Common.DbColumn>>
Public Overridable Function GetColumnSchemaAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of ReadOnlyCollection(Of DbColumn))

Paramètres

cancellationToken
CancellationToken

Instruction d’annulation.

Retours

Tâche représentant l’opération asynchrone.

Exceptions

Le jeton d’annulation a été annulé. Cette exception est stockée dans la tâche retournée.

S’applique à