-
Notifications
You must be signed in to change notification settings - Fork 109
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
Feature Request: Turn on Scope Validation by default #483
Comments
Please do - optimal if you can run the nightwatch tests and check they pass okay. |
Looking closer at the aspnet/DependencyInjection#481 thread, it turns out they are only enabling Scope Validation when the application is running in Development Mode which i've updated my code to mimic by looking at the Debug Compilation Flag. This makes sense since Scope Validation has a slight performance overhead and its mainly during development you want the extra checking to see if you messed up in one of your service registrations. |
@mawtex ... and then what, something i'm missing here? |
Implemented in #484 |
As of May 10th, newer versions of the Microsoft Dependency Injection has turned on scope validation by default (https://github.com/aspnet/DependencyInjection/releases/tag/rel%2F2.0.0-preview1) which i believe would be the right thing to do in C1 as well as long as we're using version < 2.0.
This requires a simple change to this line https://github.com/Orckestra/C1-CMS-Foundation/blob/dev/Composite/Core/ServiceLocator.cs#L25, where
true
is passed to theBuildServiceProvider
method.I'd be happy to send a PR if you agree in making this change.
The text was updated successfully, but these errors were encountered: