Редагувати

Поділитися через


DbDataReader.GetColumnSchemaAsync(CancellationToken) Method

Definition

This is the asynchronous version of GetColumnSchema(DbDataReader). Providers should override with an appropriate implementation. The cancellationToken can optionally be honored. The default implementation invokes the synchronous GetColumnSchema(DbDataReader) call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken. Exceptions thrown by GetColumnSchema(DbDataReader) will be communicated via the returned Task Exception property.

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))

Parameters

cancellationToken
CancellationToken

The cancellation instruction.

Returns

A task representing the asynchronous operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Applies to