Skip to content

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

Merged
scott-xu merged 1 commit into
ninject:masterfrom
lord-executor:bugfix/inconsistent-unique-handling-tryget
Apr 17, 2022
Merged

Consolidated handling of isUnique parameter for TryGet (fixes #378)#380
scott-xu merged 1 commit into
ninject:masterfrom
lord-executor:bugfix/inconsistent-unique-handling-tryget

Conversation

@lord-executor
Copy link
Copy Markdown
Contributor

@lord-executor lord-executor commented Dec 17, 2020

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
Copy link
Copy Markdown

codecov-io commented Dec 17, 2020

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%) ⬇️
...t/Planning/Bindings/BindingConfigurationBuilder.cs 72.83% <0.00%> (-0.47%) ⬇️
...t/Infrastructure/Introspection/FormatExtensions.cs 88.46% <0.00%> (-0.11%) ⬇️
src/Ninject/KernelConfiguration.cs 98.14% <0.00%> (-0.02%) ⬇️
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%) ⬆️

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.

@lord-executor lord-executor force-pushed the bugfix/inconsistent-unique-handling-tryget branch from 0c78f3c to 66c1cb4 Compare December 17, 2020 13:10
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

Successfully merging this pull request may close these issues.

Generic vs non-generic ResolutionExtension.TryGet overloads are inconsistent

3 participants