DbSpatialDataReader.GetGeometryAsync Method (Int32, CancellationToken)

 

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

Namespace:   System.Data.Entity.Spatial
Assembly:  EntityFramework (in EntityFramework.dll)

[SuppressMessageAttribute("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", 
	Justification = "Exception provided in the returned task.")]
public virtual Task<DbGeometry> GetGeometryAsync(
	int ordinal,
	CancellationToken cancellationToken
)

Parameters

ordinal
Type: System.Int32

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

cancellationToken
Type: System.Threading.CancellationToken

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

Return Value

Type: System.Threading.Tasks.Task<DbGeometry>

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

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