XmlSchemaClassGenerator icon indicating copy to clipboard operation
XmlSchemaClassGenerator copied to clipboard

Use dependency injection to manage services

Open twsouthwick opened this issue 7 years ago • 1 comments

While making a few updates to the project, it seems like there are a number of services that need to be passed around and are all updated via the Generator as well as GeneratorConfiguration via some linked properties. Already with the number of services available, this system is getting unwieldy with entries in both Generator and GeneratorConfiguration. I think it would be much simpler to swap this out to use a DI container to control this and the creation of dependencies. This would simplify using it in other applications where services could more easily be swapped out as well as depend on each other. I'd be happy to submit a PR, but wanted to solicit feedback on the idea before doing the work.

twsouthwick avatar Jun 08 '18 01:06 twsouthwick

Good idea, I'm all for it. Making the project easier to understand and maintain is very much needed IMO.

mganss avatar Jun 08 '18 09:06 mganss