Skip to content

Conversation

@dementeddevil
Copy link

Added IEntityFactory interface to abstract the process of creating new entity objects when reading a CSV stream.

This change allows the use of object-pooling semantics to reduce memory pressure when reading large CSV streams.

…w entity objects when reading a CSV stream.

This change allows the use of object-pooling semantics to reduce memory pressure when reading large CSV streams.
@mperdeck
Copy link
Owner

mperdeck commented Jul 9, 2014

Thanks for your pull request.

Before I go ahead with this, could you please add a description of this interface to the article.htm file, plus why it's there and how to use it. That way, others can use your work.

Additionally, please add unit test(s) that ensure the code still works after your change.

@dementeddevil
Copy link
Author

Apologies!

In the end I ended up refactoring the CsvContext into CsvReadContext and CsvWriteContext which enabled me to use IEntityFactory (instead of IEntityFactory) with the CsvReadContext and thus made the implementation of IEntityFactory much simpler.
Obviously this is a breaking change compared to this pull request however if you are interested in seeing it (complete with unit tests and an example of it in use) then I'll generate a new pull request and back out of this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants