{"id":13595315,"url":"https://github.com/ua-parser/uap-csharp","last_synced_at":"2025-10-06T02:14:32.308Z","repository":{"id":23031856,"uuid":"26384609","full_name":"ua-parser/uap-csharp","owner":"ua-parser","description":"C# implementation of ua-parser","archived":false,"fork":false,"pushed_at":"2022-04-19T23:25:59.000Z","size":2750,"stargazers_count":409,"open_issues_count":12,"forks_count":105,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-09-26T06:43:42.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ua-parser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-09T04:07:48.000Z","updated_at":"2025-09-24T15:18:21.000Z","dependencies_parsed_at":"2022-08-21T09:40:49.467Z","dependency_job_id":null,"html_url":"https://github.com/ua-parser/uap-csharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ua-parser/uap-csharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ua-parser","download_url":"https://codeload.github.com/ua-parser/uap-csharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ua-parser%2Fuap-csharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278547821,"owners_count":26004775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:01:47.527Z","updated_at":"2025-10-06T02:14:32.293Z","avatar_url":"https://github.com/ua-parser.png","language":"C#","funding_links":[],"categories":["C#","C\\#"],"sub_categories":[],"readme":"ua_parser C# Library\n======================\n\nThis is the CSharp implementation of [ua-parser](https://github.com/tobie/ua-parser). You can find the latest binaries on NuGet [here](https://www.nuget.org/packages/UAParser/).\n\n[![Build status](https://ci.appveyor.com/api/projects/status/ery4ydoxwtokgjkm?svg=true)](https://ci.appveyor.com/project/enemaerke/uap-csharp)\n\nThe implementation uses the shared regex patterns and overrides from regexes.yaml (found in [uap-core](https://github.com/ua-parser/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.\n\nBuild and Run Tests:\n------\nMake sure you pull down the submodules that includes the yaml files (otherwise you won't be able to compile):\n\n\tgit submodule update --init --recursive\n\nYou can then build and run the tests by invoking the `build.bat` script\n\n    .\\build.bat\n\nUpdate the embedded regexes\n------\nTo pull the latest regexes into the project:\n\n\tcd uap-core\n\tgit pull origin master\n\n\nUsage:\n--------\n```csharp\n  using UAParser;\n\n...\n\n  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\";\n\n  // get a parser with the embedded regex patterns\n  var uaParser = Parser.GetDefault();\n\n  // get a parser using externally supplied yaml definitions\n  // var uaParser = Parser.FromYaml(yamlString);\n\n  ClientInfo c = uaParser.Parse(uaString);\n\n  Console.WriteLine(c.UA.Family); // =\u003e \"Mobile Safari\"\n  Console.WriteLine(c.UA.Major);  // =\u003e \"5\"\n  Console.WriteLine(c.UA.Minor);  // =\u003e \"1\"\n\n  Console.WriteLine(c.OS.Family);        // =\u003e \"iOS\"\n  Console.WriteLine(c.OS.Major);         // =\u003e \"5\"\n  Console.WriteLine(c.OS.Minor);         // =\u003e \"1\"\n\n  Console.WriteLine(c.Device.Family);    // =\u003e \"iPhone\"\n```\n\nAuthors:\n-------\n\n  * Søren Enemærke [@sorenenemaerke](https://twitter.com/sorenenemaerke) / [github](https://github.com/enemaerke)\n  * Atif Aziz [@raboof](https://twitter.com/raboof) / [github](https://github.com/atifaziz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fua-parser%2Fuap-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fua-parser%2Fuap-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fua-parser%2Fuap-csharp/lists"}