Closed GStefanowich closed 1 year ago
Just like how I implemented Filters to automatically be found using Reflection, I changed implementations of ILineReader to be found using Reflection using the ExtensionTypesAttribute:
ILineReader
ExtensionTypesAttribute
[ExtensionTypes(".odt")] internal sealed class OpenDocumentXmlReader : CompressedXmlReader { /* Stuff */ }
[ExtensionTypes(".log", ".json", ".txt", ".sql", ".xml", ".sample", ".csv", ".tsv")] internal sealed class PlainTextReader : ILineReader { /* Stuff */ }
[ExtensionTypes(".pdf")] public sealed class PdfReader : ILineReader { /* Stuff */ }
Now line reader files are self-contained and modifying FileExtensionParsing.cs isn't necessary.
FileExtensionParsing.cs
I also added documentation for creating Filters to the CONTRIBUTING.md file
CONTRIBUTING.md
I'll look into some of the Regex performance stuff when I have more time, but this was quick and just some cleanup stuff
Just like how I implemented Filters to automatically be found using Reflection, I changed implementations of
ILineReader
to be found using Reflection using theExtensionTypesAttribute
:Now line reader files are self-contained and modifying
FileExtensionParsing.cs
isn't necessary.I also added documentation for creating Filters to the
CONTRIBUTING.md
fileI'll look into some of the Regex performance stuff when I have more time, but this was quick and just some cleanup stuff