From: campersau Date: Fri, 7 Jun 2019 08:58:20 +0000 (+0200) Subject: Pass CancellationToken to DbDataReader X-Git-Tag: submit/tizen/20210909.063632~11031^2~1345 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a86b1c1e9dbfb2d774c33872c6461003ba0b2410;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Pass CancellationToken to DbDataReader Commit migrated from https://github.com/dotnet/corefx/commit/2cae0df3a727ea1d8965978c8f3b0ffb3756de78 --- 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)