ערוך

שתף באמצעות


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)

Source:
DbConnection.cs
Source:
DbConnection.cs
Source:
DbConnection.cs

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

A task representing the asynchronous operation.

Exceptions

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

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by GetSchema(String).

Applies to

GetSchemaAsync(String, String[], CancellationToken)

Source:
DbConnection.cs
Source:
DbConnection.cs
Source:
DbConnection.cs

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

A task representing the asynchronous operation.

Exceptions

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

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by GetSchema(String, String[]).

Applies to

GetSchemaAsync(CancellationToken)

Source:
DbConnection.cs
Source:
DbConnection.cs
Source:
DbConnection.cs

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

A task representing the asynchronous operation.

Exceptions

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

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by GetSchema().

Applies to