Skip to content
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

Dependency injection #2

Closed
zHaytam opened this issue Nov 19, 2018 · 1 comment
Closed

Dependency injection #2

zHaytam opened this issue Nov 19, 2018 · 1 comment
Labels

Comments

@zHaytam
Copy link

zHaytam commented Nov 19, 2018

Hello,

Could you be kind enough to provide a fast/simple example on how would someone add dependency injection to this concept?

I fail to figure out how it's gonna work in WinForms.

Thank you!

@mrts
Copy link
Owner

mrts commented Sep 24, 2019

Presenter is already using dependency injection. I guess your question is about dependency injection containers. You don't need to use a DI container, just wire everything up in Main() like in the example. This is called Poor Man's Dependency Injection/Pure Dependency Injection and Main() is the Composition Root.

For background, see Mark Seemann's blog posts on these patterns here, here and here.

Hope this helps!

@mrts mrts added the question label Sep 24, 2019
@mrts mrts pinned this issue Sep 24, 2019
@mrts mrts closed this as completed Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants