/// <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); } }
public void Write(object entity) { writer.Write((TEntity)entity); }