DbSpatialDataReader.GetGeometryAsync(Int32, CancellationToken) Method

Definition

Asynchronously reads an instance of DbGeometry from the column at the specified column ordinal.

[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.DbGeometry> GetGeometryAsync (int ordinal, System.Threading.CancellationToken cancellationToken);
abstract member GetGeometryAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Spatial.DbGeometry>
override this.GetGeometryAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Data.Entity.Spatial.DbGeometry>

Parameters

ordinal
Int32

The ordinal of the data record column that contains the provider-specific geometry data.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

A task that represents the asynchronous operation. The task result contains the instance of DbGeometry at the specified column value.

Attributes

Remarks

Providers should override with an appropriate implementation. The default implementation invokes the synchronous GetGeometry(Int32) method and returns a completed task, blocking the calling thread.

Applies to