TokenLedger.AspNetCore
0.3.0-preview.1
This is a prerelease version of TokenLedger.AspNetCore.
dotnet add package TokenLedger.AspNetCore --version 0.3.0-preview.1
NuGet\Install-Package TokenLedger.AspNetCore -Version 0.3.0-preview.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="TokenLedger.AspNetCore" Version="0.3.0-preview.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TokenLedger.AspNetCore" Version="0.3.0-preview.1" />
<PackageReference Include="TokenLedger.AspNetCore" />
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 TokenLedger.AspNetCore --version 0.3.0-preview.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TokenLedger.AspNetCore, 0.3.0-preview.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 TokenLedger.AspNetCore@0.3.0-preview.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=TokenLedger.AspNetCore&version=0.3.0-preview.1&prerelease
#tool nuget:?package=TokenLedger.AspNetCore&version=0.3.0-preview.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
TokenLedger.AspNetCore
TokenLedger for ASP.NET Core integration tests: each model call is attributed to the HTTP endpoint that made it, so baselines and pull request reports show the cost per endpoint.
// The test host: add TokenLedger's middleware.
public sealed class ApiFactory : WebApplicationFactory<Program>
{
protected override void ConfigureWebHost(IWebHostBuilder builder) =>
builder.ConfigureServices(services => services.AddTokenLedger());
}
// A test: requests sent through LedgerHttpHandler are measured in the scenario.
await using var ledger = Ledger.Scenario("api/support-chat");
var client = factory.CreateDefaultClient(new LedgerHttpHandler(ledger));
var response = await client.PostAsJsonAsync("/api/support/chat", new { message = "Where is my order 42?" });
The baseline gains an endpoints section, and a change in the calls of one endpoint is reported by name:
regression POST api/support/chat: model calls 2 → 3
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- TokenLedger (>= 0.3.0-preview.1)
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.3.0-preview.1 | 68 | 10/26/2026 |