Soenneker.Extensions.ServiceProvider
4.0.334
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Extensions.ServiceProvider --version 4.0.334
NuGet\Install-Package Soenneker.Extensions.ServiceProvider -Version 4.0.334
<PackageReference Include="Soenneker.Extensions.ServiceProvider" Version="4.0.334" />
<PackageVersion Include="Soenneker.Extensions.ServiceProvider" Version="4.0.334" />
<PackageReference Include="Soenneker.Extensions.ServiceProvider" />
paket add Soenneker.Extensions.ServiceProvider --version 4.0.334
#r "nuget: Soenneker.Extensions.ServiceProvider, 4.0.334"
#:package Soenneker.Extensions.ServiceProvider@4.0.334
#addin nuget:?package=Soenneker.Extensions.ServiceProvider&version=4.0.334
#tool nuget:?package=Soenneker.Extensions.ServiceProvider&version=4.0.334
Soenneker.Extensions.ServiceProvider
Extension methods for resolving and validating services through IServiceProvider, with diagnostics suited to application and integration-test setup.
Installation
dotnet add package Soenneker.Extensions.ServiceProvider
Usage
using Soenneker.Extensions.ServiceProvider;
IMyService service = serviceProvider.Get<IMyService>();
Get<T>() returns the registered instance when it is assignable to T. A missing or incompatible registration throws InvalidOperationException with checks for service registration, test collections, fixtures, startup types, and factories. A null provider throws ArgumentNullException.
This is similar to GetRequiredService<T>(), but its error text is specifically useful in Soenneker integration tests.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Soenneker.Extensions.ServiceProvider:
| Package | Downloads |
|---|---|
|
Soenneker.Tests.FixturedUnit
A fundamental xUnit test that stores UnitFixture and provides synthetic inversion of control |
|
|
Soenneker.Tests.HostedUnit
A fundamental test that stores the TestHost and provides synthetic inversion of control |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.337 | 0 | 9/24/2026 |
| 4.0.336 | 17,913 | 9/15/2026 |
| 4.0.335 | 35,842 | 9/12/2026 |
| 4.0.334 | 18,366 | 9/8/2026 |
| 4.0.333 | 99,376 | 8/29/2026 |
| 4.0.331 | 283 | 8/29/2026 |
| 4.0.330 | 67,062 | 8/12/2026 |
| 4.0.329 | 76,083 | 7/27/2026 |
| 4.0.328 | 66,908 | 7/16/2026 |
| 4.0.327 | 18,401 | 7/15/2026 |
| 4.0.326 | 69,909 | 6/18/2026 |
| 4.0.325 | 48,752 | 6/9/2026 |
| 4.0.324 | 34,858 | 6/5/2026 |
| 4.0.323 | 59,060 | 5/12/2026 |
| 4.0.322 | 59,116 | 4/22/2026 |
| 4.0.321 | 21,154 | 4/21/2026 |
| 4.0.320 | 20,172 | 4/14/2026 |
| 4.0.319 | 41,112 | 3/12/2026 |
| 4.0.318 | 169 | 3/12/2026 |
| 4.0.317 | 160 | 3/12/2026 |
Update dependency Microsoft.Extensions.DependencyInjection.Abstractions to 10.0.12 (#445)