KustoLoco.UserAgent
1.4.8
dotnet add package KustoLoco.UserAgent --version 1.4.8
NuGet\Install-Package KustoLoco.UserAgent -Version 1.4.8
<PackageReference Include="KustoLoco.UserAgent" Version="1.4.8" />
<PackageVersion Include="KustoLoco.UserAgent" Version="1.4.8" />
<PackageReference Include="KustoLoco.UserAgent" />
paket add KustoLoco.UserAgent --version 1.4.8
#r "nuget: KustoLoco.UserAgent, 1.4.8"
#:package KustoLoco.UserAgent@1.4.8
#addin nuget:?package=KustoLoco.UserAgent&version=1.4.8
#tool nuget:?package=KustoLoco.UserAgent&version=1.4.8
KustoLoco.UserAgent
An optional user-agent parser for KustoLoco's parse_user_agent() function.
KustoLoco's core engine implements parse_user_agent() natively but ships no user-agent
dataset — the function reads from an IUserAgentParser that the host registers. This package
is one such provider, backed by the canonical
ua-parser / uap-core dataset (regexes.yaml,
Apache-2.0), which is embedded in the assembly. The parsing cascade is an original,
dependency-free implementation of the uap-core specification.
Usage
using KustoLoco.Core;
using KustoLoco.UserAgent;
var context = new KustoQueryContext();
context.AddProvider<IUserAgentParser>(UapUserAgentParser.Default);
var result = await context.RunQuery(
"print ua = parse_user_agent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) " +
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36')");
UapUserAgentParser.Default is a shared, immutable instance built from the embedded dataset,
safe to reuse across concurrent queries. You can also construct one from a newer
regexes.yaml stream via new UapUserAgentParser(stream).
Output shape
parse_user_agent() returns a dynamic object with the uap-core structure:
{
"Browser": { "Family": "...", "Major": "...", "Minor": "...", "Patch": "..." },
"OperatingSystem": { "Family": "...", "Major": "...", "Minor": "...", "Patch": "...", "PatchMinor": "..." },
"Device": { "Family": "...", "Brand": "...", "Model": "..." }
}
Unmatched components resolve to Family: "Other", exactly as uap-core specifies.
Attribution
The embedded dataset is © the ua-parser contributors, licensed Apache-2.0. See NOTICE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net10.0
- KustoLoco.Core (>= 1.4.8)
-
net9.0
- KustoLoco.Core (>= 1.4.8)
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 |
|---|---|---|
| 1.4.8 | 148 | 9/6/2026 |