MassiveDotNet.Extensions.DependencyInjection 0.4.1

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package MassiveDotNet.Extensions.DependencyInjection --version 0.4.1
                    
NuGet\Install-Package MassiveDotNet.Extensions.DependencyInjection -Version 0.4.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MassiveDotNet.Extensions.DependencyInjection" Version="0.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MassiveDotNet.Extensions.DependencyInjection" Version="0.4.1" />
                    
Directory.Packages.props
<PackageReference Include="MassiveDotNet.Extensions.DependencyInjection" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MassiveDotNet.Extensions.DependencyInjection --version 0.4.1
                    
#r "nuget: MassiveDotNet.Extensions.DependencyInjection, 0.4.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MassiveDotNet.Extensions.DependencyInjection@0.4.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MassiveDotNet.Extensions.DependencyInjection&version=0.4.1
                    
Install as a Cake Addin
#tool nuget:?package=MassiveDotNet.Extensions.DependencyInjection&version=0.4.1
                    
Install as a Cake Tool

MassiveDotNet.Extensions.DependencyInjection

Dependency injection and IHttpClientFactory wiring for the MassiveDotNet SDK — ASP.NET Core, the Generic Host, or anything with an IServiceCollection.

dotnet add package MassiveDotNet.Extensions.DependencyInjection

Quick start

builder.Services.AddMassive(options =>
{
    options.ApiKey = builder.Configuration["Massive:ApiKey"];
    options.UserAgent = "my-app/1.0";
});

MassiveRestClient then arrives by injection like any other service.

AddMassive returns the IHttpClientBuilder for the underlying named client, so resilience, logging or any other handler goes on the same pipeline:

builder.Services.AddMassive(apiKey)
       .AddStandardResilienceHandler();   // Microsoft.Extensions.Http.Resilience

Two deliberate choices

Singletons, not the typed-client pattern. The transport and the client register as singletons over one HttpClient resolved from the factory, rather than through AddHttpClient<T>. A typed client registers transient, and MassiveRestClient is IDisposable — so the container would track one undisposed instance per resolution for the process lifetime, a leak that grows with traffic, and it would contradict the type's own documented contract that it is long-lived and shared. The primary handler carries PooledConnectionLifetime, which is what actually keeps DNS fresh.

No IConfiguration overload. Read the values yourself: options.ApiKey = configuration["Massive:ApiKey"]. MassiveClientOptions.Timeout is a NodaTime Duration, which the configuration binder cannot convert — and it fails silently, binding clean and leaving the default in place, which is the worst kind of wrong. One line at the call site costs less than a setting that quietly does nothing.

This is the only package in the SDK permitted to reference Microsoft.Extensions.*, and CI asserts that, so a REST-only consumer never pulls the DI stack.

Licensed MIT. Issues and source at github.com/jerbersoft/massivedotnet.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.2-ci.64 63 9/26/2026
0.4.1 103 9/24/2026
0.4.1-ci.59 47 9/24/2026
0.4.0 77 9/24/2026
0.4.0-ci.58 53 9/24/2026
0.4.0-ci.55 55 9/24/2026
0.4.0-ci.54 55 9/23/2026
0.4.0-ci.53 52 9/23/2026
0.4.0-ci.52 66 9/23/2026
0.4.0-ci.51 57 9/23/2026
0.4.0-ci.49 58 9/22/2026
0.3.0 84 9/22/2026
0.3.0-ci.48 58 9/22/2026
0.3.0-ci.47 58 9/22/2026
0.3.0-ci.46 71 9/9/2026
0.3.0-ci.45 61 9/9/2026
0.2.0 102 9/9/2026
0.2.0-ci.44 69 9/9/2026
0.2.0-ci.42 63 9/9/2026
0.2.0-ci.41 67 9/9/2026