DbSpatialDataReader.GetGeographyAsync(Int32, CancellationToken) 方法

定义

从指定列序号处的列中异步读取 的 DbGeography 实例。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification="Exception provided in the returned task.")]
public virtual System.Threading.Tasks.Task<System.Data.Entity.Spatial.DbGeography> GetGeographyAsync (int ordinal, System.Threading.CancellationToken cancellationToken);
abstract member GetGeographyAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Spatial.DbGeography>
override this.GetGeographyAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Spatial.DbGeography>

参数

ordinal
Int32

包含 geography 值的列的序号。

cancellationToken
CancellationToken

等待 CancellationToken 任务完成时要观察的 。

返回

表示异步操作的任务。 任务结果包含位于指定列值的 实例 DbGeography

属性

注解

提供程序应使用合适的实现进行重写。 默认实现调用同步 GetGeography(Int32) 方法并返回已完成任务,以便阻止调用线程。

适用于