DbConnection.GetSchemaAsync Method

Definition

Overloads

GetSchemaAsync(String, CancellationToken)

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

GetSchemaAsync(String, String[], CancellationToken)

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

GetSchemaAsync(CancellationToken)

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

GetSchemaAsync(String, CancellationToken)

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

public virtual System.Threading.Tasks.Task<System.Data.DataTable> GetSchemaAsync (string collectionName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSchemaAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.DataTable>
override this.GetSchemaAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.DataTable>
Public Overridable Function GetSchemaAsync (collectionName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DataTable)

Parameters

collectionName
String

Specifies the name of the schema to return.

cancellationToken
CancellationToken

The cancellation instruction.

Returns

Task<DataTable>

A task representing the asynchronous operation.

Applies to

GetSchemaAsync(String, String[], CancellationToken)

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

public virtual System.Threading.Tasks.Task<System.Data.DataTable> GetSchemaAsync (string collectionName, string?[] restrictionValues, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSchemaAsync : string * string[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.DataTable>
override this.GetSchemaAsync : string * string[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.DataTable>
Public Overridable Function GetSchemaAsync (collectionName As String, restrictionValues As String(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of DataTable)

Parameters

collectionName
String

Specifies the name of the schema to return.

restrictionValues
String[]

Specifies a set of restriction values for the requested schema.

cancellationToken
CancellationToken

The cancellation instruction.

Returns

Task<DataTable>

A task representing the asynchronous operation.

Applies to

GetSchemaAsync(CancellationToken)

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

public virtual System.Threading.Tasks.Task<System.Data.DataTable> GetSchemaAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetSchemaAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.DataTable>
override this.GetSchemaAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.DataTable>
Public Overridable Function GetSchemaAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of DataTable)

Parameters

cancellationToken
CancellationToken

The cancellation instruction.

Returns

Task<DataTable>

A task representing the asynchronous operation.

Applies to