IBeam.Licensing.Credits 2.9.43

dotnet add package IBeam.Licensing.Credits --version 2.9.43
                    
NuGet\Install-Package IBeam.Licensing.Credits -Version 2.9.43
                    
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="IBeam.Licensing.Credits" Version="2.9.43" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IBeam.Licensing.Credits" Version="2.9.43" />
                    
Directory.Packages.props
<PackageReference Include="IBeam.Licensing.Credits" />
                    
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 IBeam.Licensing.Credits --version 2.9.43
                    
#r "nuget: IBeam.Licensing.Credits, 2.9.43"
                    
#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 IBeam.Licensing.Credits@2.9.43
                    
#: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=IBeam.Licensing.Credits&version=2.9.43
                    
Install as a Cake Addin
#tool nuget:?package=IBeam.Licensing.Credits&version=2.9.43
                    
Install as a Cake Tool

IBeam.Licensing.Credits

Optional integration package that combines ILicenseGate with ICreditPolicyService.

Use this package when a protected operation must require both a license entitlement and credits. Licensing and Credits remain standalone packages; this package only coordinates them.

var result = await licenseCreditGate.ExecuteAsync(
    new LicenseCreditGateRequest
    {
        TenantId = tenantId,
        Subject = new LicenseSubject(LicenseSubjectTypes.User, userId),
        Entitlement = "ai:chat",
        OperationName = "ai.chat.complete",
        CreditAccountId = creditAccountId,
        CreditBucketKey = "ai-chat",
        EstimatedCredits = 10,
        MaxCredits = 50,
        CreditPolicyMode = CreditPolicyModes.StrictPrepaid
    },
    async ct =>
    {
        var response = await chat.CompleteAsync(prompt, ct);
        return new CreditMeasuredOperationResult<ChatResponse>(response, response.CreditsUsed);
    },
    ct);

If the entitlement or seat check fails, the operation is not executed. If the credit check fails, the operation is not executed. If the operation throws after a reservation was created, the reservation is released before the original exception is rethrown.

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
2.9.43 39 7/29/2026