DbDataReader.CloseAsync DbDataReader.CloseAsync DbDataReader.CloseAsync DbDataReader.CloseAsync Method

定义

异步关闭 DbDataReader 对象。Asynchronously closes the DbDataReader object.

public:
 virtual System::Threading::Tasks::Task ^ CloseAsync();
public virtual System.Threading.Tasks.Task CloseAsync ();
abstract member CloseAsync : unit -> System.Threading.Tasks.Task
override this.CloseAsync : unit -> System.Threading.Tasks.Task
Public Overridable Function CloseAsync () As Task

返回

表示异步操作的任务。A task representing the asynchronous operation.

注解

此异步方法的默认实现将委托给其同步对应项,并返回Task已完成的,这可能会阻止调用线程。The default implementation of this asynchronous method delegates to its synchronous counterpart and returns a completed Task, potentially blocking the calling thread.

支持异步编程的数据访问接口应使用异步 i/o 操作来重写默认实现。Data providers that support asynchronous programming should override the default implementation using asynchronous I/O operations.

适用于