DbDataReader.GetSchemaTableAsync(CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This is the asynchronous version of GetSchemaTable().
Providers should override with an appropriate implementation.
The cancellationToken
can optionally be honored.
The default implementation invokes the synchronous GetSchemaTable() call and returns a completed task.
The default implementation will return a cancelled task if passed an already cancelled cancellationToken
.
Exceptions thrown by GetSchemaTable() will be communicated via the returned Task Exception property.
public virtual System.Threading.Tasks.Task<System.Data.DataTable?> GetSchemaTableAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetSchemaTableAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.DataTable>
override this.GetSchemaTableAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.DataTable>
Public Overridable Function GetSchemaTableAsync (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 GetSchemaTable().
Applies to
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za