DbDataReader.CloseAsync 方法

定义

异步关闭 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

返回

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.

适用于