-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use interfaces on publicly visible classes and structs to support dependency injection #29
Comments
…dependency injection. ByronMayne#29
Code complete but will wait to make pull req until we can catch up on the merge reqs |
I would want to hide the access to the wrapped context because if you use that you loose out on the exception handling that SGF provides. Rather then make it public we could hide it around an explicit interface cast. Some people just use api based on what comes up in intelisense. If you know about the implicit cast you must have a bit of inside knowledge . |
I think it's a good safe guard to have it exposed somehow so that if the API changes having to update SGF is not a blocker. |
I compensated for that. Have a look in a few when I post that PR. BTW, so I've been a .NET programmer since is was in alpha... And in all that time never had the need to become a git expert past my own projects and teams so if there's a methodology for these updates and fixes you prefer let me know, other I'm just going to make new branches for each unique feature and PR from those. And past that, I have no idea what I'm doing :) |
For instance SgfInitializationContext and SgfSourceProductionContext just to name the two I'm working around right now. Likely want to expose the original IncrementalGeneratorInitializationContext and ILogger objects as well, maybe with note that these are convenience accessors for advanced scenarios. That would allow either using the new interfaces, or just rolling your own if more convient.
The text was updated successfully, but these errors were encountered: