ninject / Ninject

the ninja of .net dependency injectors
http://ninject.org/
Other
2.68k stars 530 forks source link

Consolidated handling of isUnique parameter for TryGet (fixes #378) #380

Closed lord-executor closed 2 years ago

lord-executor commented 3 years ago

This should fix #378.

All of the generic TryGet<T> overloads and one of the three TryGet overloads already set isUnique to true. The other two are the outliers that behave in a way that is inconsistent with the documented/expected behavior of the method.

codecov-io commented 3 years ago

Codecov Report

Merging #380 (66c1cb4) into master (3ff6bda) will decrease coverage by 0.60%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #380      +/-   ##
==========================================
- Coverage   86.67%   86.07%   -0.61%     
==========================================
  Files          92       92              
  Lines        2530     2520      -10     
==========================================
- Hits         2193     2169      -24     
- Misses        281      295      +14     
  Partials       56       56              
Impacted Files Coverage Δ
src/Ninject/Syntax/ResolutionExtensions.cs 79.16% <100.00%> (ø)
src/Ninject/ReadOnlyKernel.cs 85.78% <0.00%> (-7.65%) :arrow_down:
...t/Planning/Bindings/BindingConfigurationBuilder.cs 72.83% <0.00%> (-0.47%) :arrow_down:
...t/Infrastructure/Introspection/FormatExtensions.cs 88.46% <0.00%> (-0.11%) :arrow_down:
src/Ninject/KernelConfiguration.cs 98.14% <0.00%> (-0.02%) :arrow_down:
src/Ninject/GlobalKernelRegistration.cs 0.00% <0.00%> (ø)
...nject/Infrastructure/Language/ExtensionsForList.cs 100.00% <0.00%> (ø)
...Infrastructure/Language/ExtensionsForDictionary.cs 100.00% <0.00%> (ø)
src/Ninject/Modules/AssemblyNameRetriever.cs 79.16% <0.00%> (+4.16%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3ff6bda...c158dda. Read the comment docs.