From a86b1c1e9dbfb2d774c33872c6461003ba0b2410 Mon Sep 17 00:00:00 2001 From: campersau Date: Fri, 7 Jun 2019 10:58:20 +0200 Subject: [PATCH] Pass CancellationToken to DbDataReader Commit migrated from https://github.com/dotnet/corefx/commit/2cae0df3a727ea1d8965978c8f3b0ffb3756de78 --- .../System.Data.Common/src/System/Data/DataReaderExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Data.Common/src/System/Data/DataReaderExtensions.cs b/src/libraries/System.Data.Common/src/System/Data/DataReaderExtensions.cs index 05ec669..cff7b38 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataReaderExtensions.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataReaderExtensions.cs @@ -88,7 +88,7 @@ namespace System.Data public static Task GetFieldValueAsync(this DbDataReader reader, string name, CancellationToken cancellationToken = default(CancellationToken)) { AssertNotNull(reader); - return reader.GetFieldValueAsync(reader.GetOrdinal(name)); + return reader.GetFieldValueAsync(reader.GetOrdinal(name), cancellationToken); } public static float GetFloat(this DbDataReader reader, string name) @@ -168,7 +168,7 @@ namespace System.Data public static Task IsDBNullAsync(this DbDataReader reader, string name, CancellationToken cancellationToken = default(CancellationToken)) { AssertNotNull(reader); - return reader.IsDBNullAsync(reader.GetOrdinal(name)); + return reader.IsDBNullAsync(reader.GetOrdinal(name), cancellationToken); } private static void AssertNotNull(DbDataReader reader) -- 2.7.4