-
-
Notifications
You must be signed in to change notification settings - Fork 142
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 resolvers changed to allow registration of null with a value type #721
Conversation
Presently Getservice casts to a nullable return value object? or T?, now returns the value as a object or T
Codecov Report
@@ Coverage Diff @@
## main #721 +/- ##
==========================================
+ Coverage 73.31% 74.20% +0.89%
==========================================
Files 98 99 +1
Lines 4835 4967 +132
==========================================
+ Hits 3545 3686 +141
+ Misses 1290 1281 -9
Continue to review full report at Codecov.
|
As discussed offline GetService probably should return nullable to indicate non registration or deliberate null. |
… null if not valid housekeeping on tests fix ILogManager_Resolvable test
matched the GetServices to also return IEmeumerable<object?>
i've done a branch f50a072 to think through the getservices bit. will look again over weekend |
re-opening so i can track what i am looking at on getservices against this branch rather than diff master |
* WIP: tweaks for getservices * warnings as errors for nullable * attempt to tidy up getservices warnings * remove bak files * change autofac to use Enumerable.Empty
found an issue with Dryloc resolver with contracts, returns the wrong instance
items registered with Dryloc resolver were not retained but overwritten where multiple registrations were made with the same serviceType and different contracts
need to refresh codecov to discover remaining tests required
…b.com/reactiveui/splat into fix_GetServiceShouldntReturnANullable
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What kind of change does this PR introduce?
fix for dryloc resolver
feature for some resolvers to use a null serviceType and a Func of value type to be registered
What is the current behaviour?
Presently only one resolver can resolve null service types
Dryloc resolver fails to resolve multiple services with the same type and differing contracts
What is the new behaviour?
increased the number of resolvers that can resolve Func of value type.
Dryloc resolver now resolves multiple services with the same type and differing contracts
What might this PR break?
people using dryloc may experience a different item being resolved now compared to previously, but will now return the correct service
Please check if the PR fulfils these requirements
Other information:
Test projects have the Func of value type and null serviceType applied
FuncDependencyResolver and SimpleInjectorDependencyResolver do not currently support Func of value type