ServicePool is a customizable dependency injection library that offers the well-known benefits of DI as seen on ASP.Net projects, but extends on this concept by offering different kinds of service comsumption models (singletons, factories, one-offs) and the ability to have more than one pool with a set of independently resolved services.
The dependency injection model implemented by this library also adds a bit more flexibility when resolving dependencies for a class, even allowing a consumer app to specify its own resolution logic.
Release | Link |
---|---|
Latest public release: | |
Latest development release: |
Package Manager
Install-Package TheXDS.ServicePool
.NET CLI
dotnet add package TheXDS.ServicePool
Paket CLI
paket add TheXDS.ServicePool
Package reference
<PackageReference Include="TheXDS.ServicePool" Version="2.0.0" />
C# interactive window (CSI)
#r "nuget: TheXDS.ServicePool, 2.0.0"
ServicePool can be built on any platform or CI environment supported by dotnet.
dotnet build ./src/ServicePool.sln
The resulting binaries will be in the ./Build/bin
directory.
dotnet test ./src/ServicePool.sln
It is possible to generate a coverage report locally. For that, it is necessary to install ReportGenerator
, which will read the test results after execution, and will generate a web page with the coverage results.
To install ReportGenerator
execute:
dotnet tool install -g dotnet-reportgenerator-globaltool
After installing ReportGenerator
, it will be possible to execute the following command:
dotnet test ./src/ServicePool.sln --collect:"XPlat Code Coverage" --results-directory:./Build/Tests ; reportgenerator -reports:./Build/Tests/*/coverage.cobertura.xml -targetdir:./Build/Coverage/
The coverage reports will be stored in ./Build/Coverage
If ServicePool
is useful to you, or if you're interested in donating to sponsor the project, feel free to to a donation via PayPal, Ko-fi or just contact me directly.
Sadly, I cannot offer other means of sending donations as of right now due to my country (Honduras) not being supported by almost any platform.