Docs for members in DependencyInjection.Abstractions lack exception information. #108024
Labels
area-Extensions-DependencyInjection
documentation
Documentation bug or enhancement, does not impact product or test code
Milestone
Description
I heard feedback that folks felt the docs for
AddSingleton
lacked good information about when it would fail and why.I took a look and I agree. It seems that whenever we have a method with a corresponding
Try
method, we should be sure to include the exception docs. That will help folks if they need to use theTry
method always, or if they would prefer to just use the non-try method for simpler code and treat the exception case as an invalid configuration.Reproduction Steps
Have a look at docs https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.dependencyinjection.servicecollectionserviceextensions.addsingleton?view=net-8.0
Expected behavior
Information about meaningful thrown exceptions exists.
Actual behavior
No information exists
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: