UAParser 3.1.32

A .net wrapper for the ua-parser library

There is a newer version of this package available.
See the version list below for details.
Install-Package UAParser -Version 3.1.32
dotnet add package UAParser --version 3.1.32
<PackageReference Include="UAParser" Version="3.1.32" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UAParser --version 3.1.32
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ua_parser C# Library

This is the CSharp implementation of ua-parser. You can find the latest binaries on NuGet here.

Build status

The implementation uses the shared regex patterns and overrides from regexes.yaml (found in uap-core). The assembly embeds the latest regex patterns (enabled through a git submodule) which are loaded into the default parser. You can create a parser with more updated regex patterns by using the static methods on Parser to pass in specific patterns in yaml format.

Build and Run Tests:

Make sure you pull down the submodules that includes the yaml files (otherwise you won't be able to compile):

git submodule update --init --recursive

You can then build and run the tests by invoking the build.bat script

.\build.bat

Update the embedded regexes

To pull the latest regexes into the project:

cd uap-core
git pull origin master

Usage:

  using UAParser;

...

  string uaString = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3";

  // get a parser with the embedded regex patterns
  var uaParser = Parser.GetDefault();
  
  // get a parser using externally supplied yaml definitions
  // var uaParser = Parser.FromYaml(yamlString);

  ClientInfo c = uaParser.Parse(uaString);

  Console.WriteLine(c.UserAgent.Family); // => "Mobile Safari"
  Console.WriteLine(c.UserAgent.Major);  // => "5"
  Console.WriteLine(c.UserAgent.Minor);  // => "1"

  Console.WriteLine(c.OS.Family);        // => "iOS"
  Console.WriteLine(c.OS.Major);         // => "5"
  Console.WriteLine(c.OS.Minor);         // => "1"

  Console.WriteLine(c.Device.Family);    // => "iPhone"

Authors:

ua_parser C# Library

This is the CSharp implementation of ua-parser. You can find the latest binaries on NuGet here.

Build status

The implementation uses the shared regex patterns and overrides from regexes.yaml (found in uap-core). The assembly embeds the latest regex patterns (enabled through a git submodule) which are loaded into the default parser. You can create a parser with more updated regex patterns by using the static methods on Parser to pass in specific patterns in yaml format.

Build and Run Tests:

Make sure you pull down the submodules that includes the yaml files (otherwise you won't be able to compile):

git submodule update --init --recursive

You can then build and run the tests by invoking the build.bat script

.\build.bat

Update the embedded regexes

To pull the latest regexes into the project:

cd uap-core
git pull origin master

Usage:

  using UAParser;

...

  string uaString = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3";

  // get a parser with the embedded regex patterns
  var uaParser = Parser.GetDefault();
  
  // get a parser using externally supplied yaml definitions
  // var uaParser = Parser.FromYaml(yamlString);

  ClientInfo c = uaParser.Parse(uaString);

  Console.WriteLine(c.UserAgent.Family); // => "Mobile Safari"
  Console.WriteLine(c.UserAgent.Major);  // => "5"
  Console.WriteLine(c.UserAgent.Minor);  // => "1"

  Console.WriteLine(c.OS.Family);        // => "iOS"
  Console.WriteLine(c.OS.Major);         // => "5"
  Console.WriteLine(c.OS.Minor);         // => "1"

  Console.WriteLine(c.Device.Family);    // => "iPhone"

Authors:

NuGet packages (22)

Showing the top 5 NuGet packages that depend on UAParser:

Package Downloads
ImmediaC.SimpleCms
.Net Core CMS
sigma
Useful tools
Mii.Rinjani.Gateway.Commons
Package Description
DiegoRangel.DotNet.Framework.CQRS.Infra.CrossCutting
A common library for implementing CQRS based CrossCutting layer.
Nancy.Serilog
Nancy plugin for application-wide logging using Serilog

GitHub repositories (7)

Showing the top 5 popular GitHub repositories that depend on UAParser:

Repository Stars
smartstore/SmartStoreNET
Open Source ASP.NET MVC Enterprise eCommerce Shopping Cart Solution
exceptionless/Exceptionless
Exceptionless server and jobs
SparkDevNetwork/Rock
An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
zhontai/Admin.Core
Admin后端,前后端分离的权限管理系统,集成统一认证授权,支持国内外主流数据库自由切换和动态高级查询,基于.Net Core开发的WebApi
EdiWang/Moonglade
The .NET Core blog system of https://edi.wang, runs on Microsoft Azure

Version History

Version Downloads Last updated
3.1.44 302,168 2/14/2020
3.1.43 302,433 9/26/2019
3.1.42 20,426 9/20/2019
3.1.41 56,492 8/14/2019
3.1.40 3,046 8/13/2019
3.1.39 192 8/13/2019
3.1.38 166,628 5/29/2019
3.1.36 156,250 2/4/2019
3.1.35 67,762 12/15/2018
3.1.34 317 12/14/2018
3.1.32 9,097 12/1/2018
3.0.0 489,402 9/11/2017
2.1.0 590,654 12/9/2015
2.0.0 9,459 12/7/2015
1.2.0 110,726 10/9/2014
1.1.0 10,517 5/25/2014
1.0.2 11,142 1/31/2014
1.0.1 6,361 11/4/2013
1.0.0 16,161 1/4/2013
Show less