@@ -57,9 +57,9 @@ public static long ToTargetBlock(this IDataReader reader,
5757 /// <param name="arrayPool">The array pool to acquire buffers from.</param>
5858 /// <returns>The number of records processed.</returns>
5959 public static long ToTargetBlock ( this IDataReader reader ,
60- ITargetBlock < object [ ] > target ,
60+ ITargetBlock < object ? [ ] > target ,
6161 bool complete ,
62- ArrayPool < object > arrayPool )
62+ ArrayPool < object ? > arrayPool )
6363 {
6464 if ( reader is null ) throw new ArgumentNullException ( nameof ( reader ) ) ;
6565 if ( target is null ) throw new ArgumentNullException ( nameof ( target ) ) ;
@@ -202,9 +202,9 @@ public static long ToTargetBlock(this IDbCommand command,
202202 /// <param name="arrayPool">The array pool to acquire buffers from.</param>
203203 /// <returns>The number of records processed.</returns>
204204 public static long ToTargetBlock ( this IDbCommand command ,
205- ITargetBlock < object [ ] > target ,
205+ ITargetBlock < object ? [ ] > target ,
206206 bool complete ,
207- ArrayPool < object > arrayPool )
207+ ArrayPool < object ? > arrayPool )
208208 {
209209 if ( command is null ) throw new ArgumentNullException ( nameof ( command ) ) ;
210210 if ( target is null ) throw new ArgumentNullException ( nameof ( target ) ) ;
@@ -410,9 +410,9 @@ public static long ToTargetBlock(this IExecuteReader command,
410410 /// <param name="arrayPool">The array pool to acquire buffers from.</param>
411411 /// <returns>The number of records processed.</returns>
412412 public static long ToTargetBlock ( this IExecuteReader command ,
413- ITargetBlock < object [ ] > target ,
413+ ITargetBlock < object ? [ ] > target ,
414414 bool complete ,
415- ArrayPool < object > arrayPool )
415+ ArrayPool < object ? > arrayPool )
416416 {
417417 if ( command is null ) throw new ArgumentNullException ( nameof ( command ) ) ;
418418 if ( target is null ) throw new ArgumentNullException ( nameof ( target ) ) ;
@@ -624,9 +624,9 @@ await r.ReadAsync(cancellationToken).ConfigureAwait(false)
624624 /// <param name="cancellationToken">An optional cancellation token.</param>
625625 /// <returns>The number of records processed.</returns>
626626 public static async ValueTask < long > ToTargetBlockAsync ( this IDataReader reader ,
627- ITargetBlock < object [ ] > target ,
627+ ITargetBlock < object ? [ ] > target ,
628628 bool complete ,
629- ArrayPool < object > arrayPool ,
629+ ArrayPool < object ? > arrayPool ,
630630 CancellationToken cancellationToken = default )
631631 {
632632 if ( reader is null ) throw new ArgumentNullException ( nameof ( reader ) ) ;
@@ -776,7 +776,7 @@ public static async ValueTask<long> ToTargetBlockAsync(this IDbCommand command,
776776 try
777777 {
778778 return await command . ExecuteReaderAsync ( reader =>
779- ToTargetBlockAsync ( reader , target , false , cancellationToken ) , cancellationToken : cancellationToken ) ;
779+ ToTargetBlockAsync ( reader , target , false , cancellationToken ) , cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ;
780780 }
781781 catch ( Exception ex )
782782 {
@@ -806,9 +806,9 @@ public static async ValueTask<long> ToTargetBlockAsync(this IDbCommand command,
806806 /// <param name="cancellationToken">An optional cancellation token.</param>
807807 /// <returns>The number of records processed.</returns>
808808 public static async ValueTask < long > ToTargetBlockAsync ( this IDbCommand command ,
809- ITargetBlock < object [ ] > target ,
809+ ITargetBlock < object ? [ ] > target ,
810810 bool complete ,
811- ArrayPool < object > arrayPool ,
811+ ArrayPool < object ? > arrayPool ,
812812 CancellationToken cancellationToken = default )
813813 {
814814 if ( command is null ) throw new ArgumentNullException ( nameof ( command ) ) ;
@@ -822,7 +822,7 @@ public static async ValueTask<long> ToTargetBlockAsync(this IDbCommand command,
822822 try
823823 {
824824 return await command . ExecuteReaderAsync ( reader =>
825- ToTargetBlockAsync ( reader , target , false , arrayPool ) , cancellationToken : cancellationToken ) ;
825+ ToTargetBlockAsync ( reader , target , false , arrayPool ) , cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ;
826826 }
827827 catch ( Exception ex )
828828 {
@@ -868,7 +868,7 @@ public static async ValueTask<long> ToTargetBlockAsync<T>(this IDbCommand comman
868868 try
869869 {
870870 return await command . ExecuteReaderAsync ( reader =>
871- ToTargetBlockAsync ( reader , target , false , transform ) , cancellationToken : cancellationToken ) ;
871+ ToTargetBlockAsync ( reader , target , false , transform ) , cancellationToken : cancellationToken ) . ConfigureAwait ( false ) ;
872872 }
873873 catch ( Exception ex )
874874 {
@@ -913,11 +913,11 @@ public static async ValueTask<long> ToTargetBlockAsync<T>(this IDbCommand comman
913913 try
914914 {
915915 var dbc = command as DbCommand ;
916- var state = dbc == null ? command . Connection . EnsureOpen ( ) : await dbc . Connection . EnsureOpenAsync ( cancellationToken ) ;
916+ var state = dbc == null ? command . Connection . EnsureOpen ( ) : await dbc . Connection . EnsureOpenAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
917917 var behavior = CommandBehavior . SingleResult ;
918918 if ( state == ConnectionState . Closed ) behavior |= CommandBehavior . CloseConnection ;
919919 using var reader = dbc == null ? command . ExecuteReader ( behavior ) : await dbc . ExecuteReaderAsync ( behavior , cancellationToken ) . ConfigureAwait ( false ) ;
920- return await ToTargetBlockAsync ( reader , target , false , cancellationToken ) ;
920+ return await ToTargetBlockAsync ( reader , target , false , cancellationToken ) . ConfigureAwait ( false ) ;
921921 }
922922 catch ( Exception ex )
923923 {
@@ -964,11 +964,11 @@ public static async ValueTask<long> ToTargetBlockAsync<T>(this IDbCommand comman
964964 try
965965 {
966966 var dbc = command as DbCommand ;
967- var state = dbc == null ? command . Connection . EnsureOpen ( ) : await dbc . Connection . EnsureOpenAsync ( cancellationToken ) ;
967+ var state = dbc == null ? command . Connection . EnsureOpen ( ) : await dbc . Connection . EnsureOpenAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
968968 var behavior = CommandBehavior . SingleResult ;
969969 if ( state == ConnectionState . Closed ) behavior |= CommandBehavior . CloseConnection ;
970970 using var reader = dbc == null ? command . ExecuteReader ( behavior ) : await dbc . ExecuteReaderAsync ( behavior , cancellationToken ) . ConfigureAwait ( false ) ;
971- return await ToTargetBlockAsync ( reader , target , false , fieldMappingOverrides , cancellationToken ) ;
971+ return await ToTargetBlockAsync ( reader , target , false , fieldMappingOverrides , cancellationToken ) . ConfigureAwait ( false ) ;
972972 }
973973 catch ( Exception ex )
974974 {
@@ -1007,7 +1007,7 @@ public static async ValueTask<long> ToTargetBlockAsync(this IExecuteReader comma
10071007 try
10081008 {
10091009 return await command . ExecuteReaderAsync ( reader =>
1010- ToTargetBlockAsync ( reader , target , false , command . CancellationToken ) ) ;
1010+ ToTargetBlockAsync ( reader , target , false , command . CancellationToken ) ) . ConfigureAwait ( false ) ;
10111011 }
10121012 catch ( Exception ex )
10131013 {
@@ -1036,9 +1036,9 @@ public static async ValueTask<long> ToTargetBlockAsync(this IExecuteReader comma
10361036 /// <param name="arrayPool">The array pool to acquire buffers from.</param>
10371037 /// <returns>The number of records processed.</returns>
10381038 public static async ValueTask < long > ToTargetBlockAsync ( this IExecuteReader command ,
1039- ITargetBlock < object [ ] > target ,
1039+ ITargetBlock < object ? [ ] > target ,
10401040 bool complete ,
1041- ArrayPool < object > arrayPool )
1041+ ArrayPool < object ? > arrayPool )
10421042 {
10431043 if ( command is null ) throw new ArgumentNullException ( nameof ( command ) ) ;
10441044 if ( target is null ) throw new ArgumentNullException ( nameof ( target ) ) ;
@@ -1049,7 +1049,7 @@ public static async ValueTask<long> ToTargetBlockAsync(this IExecuteReader comma
10491049 try
10501050 {
10511051 return await command . ExecuteReaderAsync ( reader =>
1052- ToTargetBlockAsync ( reader , target , false , arrayPool , command . CancellationToken ) ) ;
1052+ ToTargetBlockAsync ( reader , target , false , arrayPool , command . CancellationToken ) ) . ConfigureAwait ( false ) ;
10531053 }
10541054 catch ( Exception ex )
10551055 {
@@ -1091,7 +1091,7 @@ public static async ValueTask<long> ToTargetBlockAsync<T>(this IExecuteReader co
10911091 try
10921092 {
10931093 return await command . ExecuteReaderAsync ( reader =>
1094- ToTargetBlockAsync ( reader , target , false , transform , command . CancellationToken ) ) ;
1094+ ToTargetBlockAsync ( reader , target , false , transform , command . CancellationToken ) ) . ConfigureAwait ( false ) ;
10951095 }
10961096 catch ( Exception ex )
10971097 {
@@ -1133,7 +1133,7 @@ public static async ValueTask<long> ToTargetBlockAsync<T>(this IExecuteReader co
11331133 try
11341134 {
11351135 return await command . ExecuteReaderAsync ( reader =>
1136- ToTargetBlockAsync ( reader , target , false , command . CancellationToken ) ) ;
1136+ ToTargetBlockAsync ( reader , target , false , command . CancellationToken ) ) . ConfigureAwait ( false ) ;
11371137 }
11381138 catch ( Exception ex )
11391139 {
@@ -1176,7 +1176,7 @@ public static async ValueTask<long> ToTargetBlockAsync<T>(this IExecuteReader co
11761176 try
11771177 {
11781178 return await command . ExecuteReaderAsync ( reader =>
1179- ToTargetBlockAsync ( reader , target , false , fieldMappingOverrides , command . CancellationToken ) ) ;
1179+ ToTargetBlockAsync ( reader , target , false , fieldMappingOverrides , command . CancellationToken ) ) . ConfigureAwait ( false ) ;
11801180 }
11811181 catch ( Exception ex )
11821182 {
0 commit comments