Add remarks/seealso docs to DI Add*/TryAdd* methods in DependencyInjection.Abstractions#124592
Draft
Add remarks/seealso docs to DI Add*/TryAdd* methods in DependencyInjection.Abstractions#124592
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-meta |
Co-authored-by: svick <287848+svick@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update AddSingleton documentation to include exception information
Add remarks/seealso docs to DI Add* and TryAdd* methods in DependencyInjection.Abstractions
Feb 19, 2026
Co-authored-by: svick <287848+svick@users.noreply.github.com>
Copilot
AI
changed the title
Add remarks/seealso docs to DI Add* and TryAdd* methods in DependencyInjection.Abstractions
Improve XML docs for DI Add*/TryAdd* methods in DependencyInjection.Abstractions
Feb 19, 2026
Co-authored-by: svick <287848+svick@users.noreply.github.com>
Copilot
AI
changed the title
Improve XML docs for DI Add*/TryAdd* methods in DependencyInjection.Abstractions
Add remarks/seealso docs to DI Add*/TryAdd* methods in DependencyInjection.Abstractions
Feb 19, 2026
svick
approved these changes
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AddSingleton/AddScoped/AddTransientand their keyed/Try variants lacked documentation explaining multiple-registration semantics and cross-references betweenAdd*andTryAdd*overloads.Description
ServiceCollectionServiceExtensions.cs— Added<remarks>to allAddTransient,AddScoped,AddSingletonoverloads clarifying that each call unconditionally appends a registration,GetServicereturns the last registered instance, andGetServices<T>retrieves all registrations.ServiceCollectionServiceExtensions.Keyed.cs— Same<remarks>added to allAddKeyedTransient,AddKeyedScoped,AddKeyedSingletonoverloads, correctly referencingServiceProviderKeyedServiceExtensions.GetKeyedService{T}andGetKeyedServices{T}(keyed services are not retrievable via the non-keyedGetService/GetServicesAPIs).ServiceCollectionDescriptorExtensions.cs— Added<seealso>to eachTryAddTransient,TryAddScoped,TryAddSingletonoverload pointing to the correspondingAdd*overload.ServiceCollectionDescriptorExtensions.Keyed.cs— Same<seealso>additions for eachTryAddKeyed*overload.Testing
Documentation-only change; no behavioral modifications.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.