You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Channel/AsChannel.cs
+130-8Lines changed: 130 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,27 @@ public static ChannelReader<T> AsChannel<T>(this IDataReader reader,
99
99
returnchannel.Reader;
100
100
}
101
101
102
+
/// <summary>
103
+
/// Iterates an IDataReader mapping the results to classes of type <typeparamref name="T"/> and writes each record an unbound channel.
104
+
/// </summary>
105
+
/// <typeparam name="T">The return type of the transform function.</typeparam>
106
+
/// <param name="reader">The IDataReader to iterate.</param>
107
+
/// <param name="singleReader">True will cause the resultant reader to optimize for the assumption that no concurrent read operations will occur.</param>
@@ -189,6 +210,27 @@ public static ChannelReader<T> AsChannel<T>(this IDbCommand command,
189
210
returnchannel.Reader;
190
211
}
191
212
213
+
/// <summary>
214
+
/// Iterates an IDataReader mapping the results to classes of type <typeparamref name="T"/> and writes each record an unbound channel.
215
+
/// </summary>
216
+
/// <typeparam name="T">The return type of the transform function.</typeparam>
217
+
/// <param name="command">The command to acquire a reader from to iterate.</param>
218
+
/// <param name="singleReader">True will cause the resultant reader to optimize for the assumption that no concurrent read operations will occur.</param>
@@ -219,7 +261,7 @@ public static ChannelReader<T> AsChannel<T>(this IDbCommand command,
219
261
/// <param name="command">The IDataReader to iterate.</param>
220
262
/// <param name="singleReader">True will cause the resultant reader to optimize for the assumption that no concurrent read operations will occur.</param>
221
263
/// <returns>The channel reader containing the results.</returns>
@@ -238,7 +280,7 @@ public static ChannelReader<object[]> AsChannel<T>(this IExecuteReader command,
238
280
/// <param name="singleReader">True will cause the resultant reader to optimize for the assumption that no concurrent read operations will occur.</param>
239
281
/// <param name="arrayPool">The array pool to acquire buffers from.</param>
240
282
/// <returns>The channel reader containing the results.</returns>
@@ -273,6 +315,25 @@ public static ChannelReader<T> AsChannel<T>(this IExecuteReader command,
273
315
returnchannel.Reader;
274
316
}
275
317
318
+
/// <summary>
319
+
/// Iterates an IDataReader mapping the results to classes of type <typeparamref name="T"/> and writes each record an unbound channel.
320
+
/// </summary>
321
+
/// <typeparam name="T">The return type of the transform function.</typeparam>
322
+
/// <param name="command">The IDataReader to iterate.</param>
323
+
/// <param name="singleReader">True will cause the resultant reader to optimize for the assumption that no concurrent read operations will occur.</param>
324
+
/// <returns>The channel reader containing the results.</returns>
@@ -363,6 +424,27 @@ public static ChannelReader<T> AsChannelAsync<T>(this DbDataReader reader,
363
424
returnchannel.Reader;
364
425
}
365
426
427
+
/// <summary>
428
+
/// Asynchronously iterates an DbDataReader mapping the results to classes of type <typeparamref name="T"/> and writes each record an unbound channel.
429
+
/// </summary>
430
+
/// <typeparam name="T">The return type of the transform function.</typeparam>
431
+
/// <param name="reader">The IDataReader to iterate.</param>
432
+
/// <param name="singleReader">True will cause the resultant reader to optimize for the assumption that no concurrent read operations will occur.</param>
@@ -453,6 +535,27 @@ public static ChannelReader<T> AsChannelAsync<T>(this DbCommand command,
453
535
returnchannel.Reader;
454
536
}
455
537
538
+
/// <summary>
539
+
/// Asynchronously iterates an DbDataReader mapping the results to classes of type <typeparamref name="T"/> and writes each record an unbound channel.
540
+
/// </summary>
541
+
/// <typeparam name="T">The return type of the transform function.</typeparam>
542
+
/// <param name="command">The command to acquire a reader from to iterate.</param>
543
+
/// <param name="singleReader">True will cause the resultant reader to optimize for the assumption that no concurrent read operations will occur.</param>
@@ -536,6 +639,25 @@ public static ChannelReader<T> AsChannelAsync<T>(this IExecuteReaderAsync comman
536
639
returnchannel.Reader;
537
640
}
538
641
642
+
/// <summary>
643
+
/// Asynchronously iterates an DbDataReader mapping the results to classes of type <typeparamref name="T"/> and writes each record an unbound channel.
644
+
/// </summary>
645
+
/// <typeparam name="T">The return type of the transform function.</typeparam>
646
+
/// <param name="command">The IDataReader to iterate.</param>
647
+
/// <param name="singleReader">True will cause the resultant reader to optimize for the assumption that no concurrent read operations will occur.</param>
648
+
/// <returns>The channel reader containing the results.</returns>
0 commit comments