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

Castle.Windsor.Extensions.DependencyInjection Cleanup #536

Closed
generik0 opened this issue Jul 6, 2020 · 5 comments
Closed

Castle.Windsor.Extensions.DependencyInjection Cleanup #536

generik0 opened this issue Jul 6, 2020 · 5 comments
Milestone

Comments

@generik0
Copy link
Contributor

generik0 commented Jul 6, 2020

Hi @jonorossi and @ltines.

I went through the Castle.Windsor.Extensions.DependencyInjection with a fine come and cleaned up.
Do you want the refactoring?
I will make a PR

generik0 added a commit to generik0/Windsor that referenced this issue Jul 6, 2020
generik0 added a commit to generik0/Windsor that referenced this issue Jul 6, 2020
generik0 added a commit to generik0/Windsor that referenced this issue Jul 6, 2020
generik0 added a commit to generik0/Windsor that referenced this issue Jul 6, 2020
generik0 added a commit to generik0/Windsor that referenced this issue Jul 6, 2020
generik0 added a commit to generik0/Windsor that referenced this issue Jul 6, 2020
generik0 added a commit to generik0/Windsor that referenced this issue Jul 6, 2020
@generik0
Copy link
Contributor Author

generik0 commented Jul 7, 2020

Hi.
This branch is important because I found unused methods, fields. And in general some things needed cleaning up ;-)

generik0 added a commit to generik0/Windsor that referenced this issue Jul 8, 2020
@generik0
Copy link
Contributor Author

generik0 commented Jul 8, 2020

@ltines i have noticed that

internal static ExtensionContainerRootScope RootScope {get; private set;}

Has a static var used to keep the root scope?

Are we sure using static isn't anti-OO / not SOLID?
Could something else be used? Maybe get the logic out of an extension to a class instance?

generik0 added a commit to generik0/Windsor that referenced this issue Jul 8, 2020
…viderFactoryBase to improve SOLID behaviour and allow more external control

castleproject#536
@ltines
Copy link
Contributor

ltines commented Jul 9, 2020

@generik0 the root scope is there so singleton instances can be linked to a scope with explicit Dispose (.NET expects singletons to be disposed on dispose of "outermost" ServiceProvider

@generik0
Copy link
Contributor Author

Hi @ltines
Yes I understand that. I just think it might be a little anti IOC/ anti pattern exposing a internal static prop for a class.
I have tried to figure out an alternative, but cannot...

@jonorossi jonorossi added this to the v5.1.0 milestone Aug 31, 2020
@generik0
Copy link
Contributor Author

@jonorossi i will close this. The current implementation is good enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants