I'm representing the contents of a (rigidly defined) Excel sheet in a WPF application. An "ExcelContainer" class parses the .xlsx and slots all data into matching ExcelContainer fields. Each field has a public property for two-way data-binding, and the the WPF client exposes all data to the user this way.
I'm manually creating & keeping up-to-date all ExcelContainer fields and properties, and there's a lot of them. Maintenance is becoming problematic as the input .xlsx grows... it's not pretty or efficient. I'm looking for a strategy to automate all of this.
One idea is to auto-generate the getters and setters at runtime, or emit an auto-generated code file with all ExcelContainer properties. I'm looking for C#-specific approaches to do this (in VS2015, if that matters). I can imagine brute-force code file generation via a build system, but I suspect that C# gives me better opportunities than that.
Links to blog posts etc. welcome!