JJConsulting.Infinity.Client
1.4.33
See the version list below for details.
dotnet add package JJConsulting.Infinity.Client --version 1.4.33
NuGet\Install-Package JJConsulting.Infinity.Client -Version 1.4.33
<PackageReference Include="JJConsulting.Infinity.Client" Version="1.4.33" />
<PackageVersion Include="JJConsulting.Infinity.Client" Version="1.4.33" />
<PackageReference Include="JJConsulting.Infinity.Client" />
paket add JJConsulting.Infinity.Client --version 1.4.33
#r "nuget: JJConsulting.Infinity.Client, 1.4.33"
#:package JJConsulting.Infinity.Client@1.4.33
#addin nuget:?package=JJConsulting.Infinity.Client&version=1.4.33
#tool nuget:?package=JJConsulting.Infinity.Client&version=1.4.33
JJConsulting.Infinity.Client
Client library for interacting with the JJInfinity API, providing typed access to its endpoints and integration support for .NET applications.
Installation
Install via NuGet Package Manager:
dotnet add package JJConsulting.Infinity.Client
Or via the NuGet Package Manager UI in Visual Studio or Rider.
For Serilog ASP.NET Core integration, also install:
dotnet add package Serilog.AspNetCore
Usage
1. Register the client in your Program.cs:
using JJConsulting.Infinity.Client.Configuration;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddInfinityClient(options =>
{
options.BaseAddress = builder.Configuration["Infinity:BaseAddress"]!;
options.Token = builder.Configuration["Infinity:Token"]!;
});
// OR, if you need SignIn authentication:
builder.Services.AddInfinityClient(options =>
{
options.BaseAddress = builder.Configuration["Infinity:BaseAddress"]!;
options.Username = builder.Configuration["Infinity:Username"]!;
options.Password = builder.Configuration["Infinity:Password"]!;
});
var app = builder.Build();
Localization Providers
You can register one or more localization providers and sync them automatically at application startup:
using JJConsulting.Infinity.Client.Configuration;
using JJConsulting.Infinity.Client.Localization;
public sealed class AppLocalizationProvider : IInfinityLocalizationProvider
{
public Task<List<string>> GetKeysAsync(CancellationToken cancellationToken = default)
{
return Task.FromResult(new List<string>
{
"Hello",
"Home.Title"
});
}
}
builder.Services
.AddInfinityClient(options =>
{
options.BaseAddress = builder.Configuration["Infinity:BaseAddress"]!;
options.Token = builder.Configuration["Infinity:Token"]!;
})
.WithInfinityLocalization("MyApp")
.AddKeysFromLocalizationProvider<AppLocalizationProvider>();
At startup, each provider is executed and the client sends its keys to POST /localization/sources/{source}/keys.
Resource File Provider (.resx)
If you already maintain translations in resource files, you can register AddKeysFromResources<TResource>().
The provider reads all resource files for TResource (neutral + culture-specific resources) and sends discovered keys during startup sync.
using JJConsulting.Infinity.Client.Configuration;
// Marker type that has matching .resx files, for example:
// - MyAppResources.resx
// - MyAppResources.pt-BR.resx
public sealed class MyAppResources;
builder.Services
.AddInfinityClient(options =>
{
options.BaseAddress = builder.Configuration["Infinity:BaseAddress"]!;
options.Token = builder.Configuration["Infinity:Token"]!;
})
.WithInfinityLocalization("MyApp")
.AddKeysFromResources<MyAppResources>();
Manual Localization API
If you need to call localization endpoints directly, inject ILocalizationService:
using JJConsulting.Infinity.Localization;
public sealed class LocalizationSyncService(ILocalizationService localizationService)
{
public async Task SyncAsync(CancellationToken cancellationToken = default)
{
await localizationService.SetStringsAsync("MyApp", new List<LocalizationCultureStrings>
{
new()
{
Culture = "en-US",
Strings = new Dictionary<string, string>
{
["Hello"] = "Hello"
}
}
}, cancellationToken);
await localizationService.AddKeysAsync("MyApp", ["NewKey1", "NewKey2"], cancellationToken);
}
}
AddKeysAsync maps to POST /localization/sources/{source}/keys and ignores keys that already exist in the source.
Using sign authentication relies on your username and password. If the password is ever changed, this client will fail until updated. For a more stable setup, prefer token authentication.
You can generate a token selecting a user at /Admin/Users and generating a token at "Tokens".
2. Inject and use services in your application:
using JJConsulting.Infinity.Domain.Contracts;
using JJConsulting.Infinity.Domain.Identity.Users;
public class MyService(IUserService userService)
{
public async Task<UserDetails> GetUserAsync(Guid userId)
{
var user = await userService.GetUserAsync(userId);
// Handle the user
}
}
Serilog Integration (ASP.NET Core)
Send structured logs from Serilog directly to the JJInfinity API using Serilog.AspNetCore.
1. Configure Serilog in Program.cs using builder.Host.UseSerilog:
using JJConsulting.Infinity.Client.Configuration;
using Serilog;
using Serilog.Formatting.Compact;
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseSerilog((context, services, loggerConfig) =>
{
loggerConfig
.WriteTo.Console()
.WriteTo.InfinityHttp(options =>
{
options.BaseAddress = context.Configuration["Infinity:BaseAddress"]!;
options.Token = context.Configuration["Infinity:Token"]!;
});
});
builder.Services.AddInfinityClient(options =>
{
options.BaseAddress = builder.Configuration["Infinity:BaseAddress"]!;
options.Token = builder.Configuration["Infinity:Token"]!;
});
var app = builder.Build();
2. Use Serilog normally in your application using ILogger:
public class OrderController(ILogger<OrderController> logger) : ControllerBase
{
[HttpGet("{id}")]
public IActionResult GetOrder(int id)
{
logger.LogInformation("Fetching order with ID {OrderId}", id);
return Ok();
}
Features
- Typed access to JJInfinity API endpoints
- Integration with
Microsoft.Extensions.DependencyInjection - Supports .NET Standard 2.0 and above
Public API
The public API is available here.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- JJConsulting.Infinity.Domain (>= 1.4.33)
- JJConsulting.Infinity.Localization (>= 1.4.33)
- Microsoft.Extensions.Configuration (>= 10.0.3)
- Microsoft.Extensions.Http (>= 10.0.1)
- Microsoft.Extensions.Localization.Abstractions (>= 10.0.1)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Sinks.Http (>= 9.2.0)
- System.Net.Http.Json (>= 10.0.1)
-
net10.0
- JJConsulting.Infinity.Domain (>= 1.4.33)
- JJConsulting.Infinity.Localization (>= 1.4.33)
- Microsoft.Extensions.Configuration (>= 10.0.3)
- Microsoft.Extensions.Http (>= 10.0.1)
- Microsoft.Extensions.Localization.Abstractions (>= 10.0.1)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Sinks.Http (>= 9.2.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on JJConsulting.Infinity.Client:
| Package | Downloads |
|---|---|
|
JJConsulting.Infinity.Client.Webhooks
Client library for handling JJInfinity Webhooks in ASP.NET Core applications, providing typed access to audit log events with signature validation and a pluggable processing model. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.4.35 | 39 | 3/6/2026 |
| 1.4.34 | 38 | 3/6/2026 |
| 1.4.33 | 40 | 3/6/2026 |
| 1.4.32 | 37 | 3/6/2026 |
| 1.4.31 | 40 | 3/6/2026 |
| 1.4.30 | 45 | 3/5/2026 |
| 1.4.29 | 38 | 3/5/2026 |
| 1.4.28 | 38 | 3/5/2026 |
| 1.4.27 | 86 | 3/3/2026 |
| 1.4.26 | 90 | 3/2/2026 |
| 1.4.25 | 125 | 2/9/2026 |
| 1.4.24 | 103 | 2/9/2026 |
| 1.4.23 | 115 | 2/2/2026 |
| 1.4.22 | 106 | 1/30/2026 |
| 1.4.20 | 113 | 1/29/2026 |
| 1.4.19 | 107 | 1/28/2026 |
| 1.4.18 | 100 | 1/28/2026 |
| 1.4.17 | 95 | 1/28/2026 |
| 1.4.15 | 426 | 11/18/2025 |
| 1.4.13 | 229 | 11/5/2025 |