示例#1
0
 /// <summary>
 /// Writes all of the entities to the typed writer.
 /// </summary>
 /// <typeparam name="TEntity">The type of the entity the writer is configured to write.</typeparam>
 /// <param name="writer">The reader to read the entities from.</param>
 /// <param name="entities">The entities to write to the file.</param>
 /// <returns>The entities written by the writer.</returns>
 public static async Task WriteAllAsync <TEntity>(this ITypedWriter <TEntity> writer, IEnumerable <TEntity> entities)
 {
     foreach (var entity in entities)
     {
         await writer.WriteAsync(entity);
     }
 }
示例#2
0
 /// <summary>
 /// Writes all of the entities to the typed writer.
 /// </summary>
 /// <typeparam name="TEntity">The type of the entity the writer is configured to write.</typeparam>
 /// <param name="writer">The reader to read the entities from.</param>
 /// <param name="entities">The entities to write to the file.</param>
 /// <returns>The entities written by the writer.</returns>
 public static void WriteAll <TEntity>(this ITypedWriter <TEntity> writer, IEnumerable <TEntity> entities)
 {
     foreach (var entity in entities)
     {
         writer.Write(entity);
     }
 }
示例#3
0
 public UntypedWriter(ITypedWriter <TEntity> writer)
 {
     this.writer = writer;
 }