{"id":22942435,"url":"https://github.com/stardustdl/judge0-dotnet","last_synced_at":"2025-08-20T21:07:01.359Z","repository":{"id":40382322,"uuid":"278571733","full_name":"StardustDL/judge0-dotnet","owner":"StardustDL","description":"Client SDK for Judge0 RESTful API.","archived":false,"fork":false,"pushed_at":"2023-03-14T19:56:40.000Z","size":53,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-01T05:48:09.579Z","etag":null,"topics":["client","csharp","dotnet","judge0","judge0-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StardustDL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-10T07:44:55.000Z","updated_at":"2021-12-30T02:47:17.000Z","dependencies_parsed_at":"2023-01-29T15:45:57.084Z","dependency_job_id":null,"html_url":"https://github.com/StardustDL/judge0-dotnet","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/StardustDL/judge0-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StardustDL%2Fjudge0-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StardustDL%2Fjudge0-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StardustDL%2Fjudge0-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StardustDL%2Fjudge0-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StardustDL","download_url":"https://codeload.github.com/StardustDL/judge0-dotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StardustDL%2Fjudge0-dotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271385871,"owners_count":24750506,"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-08-20T02:00:09.606Z","response_time":69,"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":["client","csharp","dotnet","judge0","judge0-api"],"created_at":"2024-12-14T13:47:49.985Z","updated_at":"2025-08-20T21:07:01.303Z","avatar_url":"https://github.com/StardustDL.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# judge0-dotnet\n\n![CI](https://github.com/StardustDL/judge0-dotnet/workflows/CI/badge.svg) ![CD](https://github.com/StardustDL/judge0-dotnet/workflows/CD/badge.svg) ![License](https://img.shields.io/github/license/StardustDL/judge0-dotnet.svg) [![Judge0](https://buildstats.info/nuget/Judge0)](https://www.nuget.org/packages/Judge0/)\n\nClient SDK for [Judge0](https://github.com/judge0/api) RESTful API.\n\n## Features\n\n- Authentication\n- Authorization\n- Submissions\n- Statuses and Languages\n- System and Configuration\n- Statistics\n- Health Check\n- Information\n\n## Versions\n\nJudge0 version supported status:\n\n- [x] 1.9.0\n- [x] 1.8.0\n- [x] 1.7.1\n- [x] 1.7.0\n- [x] 1.6.0\n\n## Install\n\n```sh\ndotnet add package Judge0\n```\n\n## Usage\n\n### Create Service\n\n```csharp\nvar client = new HttpClient\n{\n    BaseAddress = new Uri(\"apiUri\")\n};\nIJudge0Service service = new Judge0Service(client);\n```\n\n### Authentication \u0026 Authorization\n\n```csharp\npublic async Task AuthenticateAndAuthorize()\n{\n    var result = await service.AuthenticationService.Authenticate(\"token\");\n    Assert.IsTrue(result.IsSuccessStatusCode);\n\n    result = await service.AuthenticationService.Authorize(\"user\");\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n```\n\n\n### Submission\n\n```csharp\npublic async Task CreateGetAndDelete()\n{\n    var result = await service.SubmissionsService.Create(new Submission\n    {\n        source_code = \"#include \u003cstdio.h\u003e\\n\\nint main(void) {\\n  char name[10];\\n  scanf(\\\"%s\\\", name);\\n  printf(\\\"hello, %s\\\\n\\\", name);\\n  return 0;\\n}\",\n        stdin = \"world\",\n        language_id = 50,\n    });\n    Assert.IsTrue(result.IsSuccessStatusCode);\n    string token = result.Result.token;\n\n    while (true)\n    {\n        await Task.Delay(TimeSpan.FromSeconds(1));\n        var res = await service.SubmissionsService.Get(token);\n        Assert.IsTrue(res.IsSuccessStatusCode);\n        if(res.Result.status?.id \u003e 2)\n        {\n            Assert.IsNotNull(res.Result.stdout);\n            StringAssert.StartsWith(res.Result.stdout, \"hello, world\");\n            break;\n        }\n    }\n\n    var del = await service.SubmissionsService.Delete(token);\n    Assert.IsTrue(del.IsSuccessStatusCode);\n}\n\npublic async Task CreateWaitGetAndDelete()\n{\n    var result = await service.SubmissionsService.CreateAndWait(new Submission\n    {\n        source_code = \"#include \u003cstdio.h\u003e\\n\\nint main(void) {\\n  char name[10];\\n  scanf(\\\"%s\\\", name);\\n  printf(\\\"hello, %s\\\\n\\\", name);\\n  return 0;\\n}\",\n        stdin = \"world\",\n        language_id = 50,\n    });\n    Assert.IsTrue(result.IsSuccessStatusCode);\n    string token = result.Result.token;\n\n    Assert.IsNotNull(result.Result.stdout);\n    StringAssert.StartsWith(result.Result.stdout, \"hello, world\");\n\n    var del = await service.SubmissionsService.Delete(token);\n    Assert.IsTrue(del.IsSuccessStatusCode);\n}\n\npublic async Task GetPaging()\n{\n    var result = await service.SubmissionsService.GetPaging();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task Batch()\n{\n    var result = await service.SubmissionsService.BatchCreate(new SubmissionBatch\n    {\n        submissions = new[]{\n            new Submission\n    {\n        source_code = \"#include \u003cstdio.h\u003e\\n\\nint main(void) {\\n  char name[10];\\n  scanf(\\\"%s\\\", name);\\n  printf(\\\"hello, %s\\\\n\\\", name);\\n  return 0;\\n}\",\n        stdin = \"world\",\n        language_id = 50,\n    },\n            new Submission\n    {\n        source_code = \"#include \u003cstdio.h\u003e\\n\\nint main(void) {\\n  char name[10];\\n  scanf(\\\"%s\\\", name);\\n  printf(\\\"hello, %s\\\\n\\\", name);\\n  return 0;\\n}\",\n        stdin = \"world\",\n        language_id = 50,\n    }\n            }\n    });\n    Assert.IsTrue(result.IsSuccessStatusCode);\n    var getres = await service.SubmissionsService.BatchGet(result.Result.Select(x =\u003e x.token));\n    Assert.IsTrue(getres.IsSuccessStatusCode);\n}\n```\n\n### Language\n\n```csharp\npublic async Task Get()\n{\n    var result = await service.LanguagesService.Get();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task GetById()\n{\n    var result = await service.LanguagesService.Get(50);\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task GetAll()\n{\n    var result = await service.LanguagesService.GetAll();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n```\n\n### Status\n\n```csharp\npublic async Task Get()\n{\n    var result = await service.StatusesService.Get();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n```\n\n### System \u0026 Configuration \u0026 Statistics \u0026 Health Check \u0026 Information\n\n```csharp\npublic async Task GetSystemInfo()\n{\n    var result = await service.SystemService.GetSystemInfo();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task GetAbout()\n{\n    var result = await service.SystemService.GetAbout();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task GetConfigInfo()\n{\n    var result = await service.SystemService.GetConfigInfo();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task GetIsolate()\n{\n    var result = await service.SystemService.GetIsolate();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task GetLicense()\n{\n    var result = await service.SystemService.GetLicense();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task GetStatistics()\n{\n    var result = await service.SystemService.GetStatistics();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task GetWorkerHealthCheck()\n{\n    var result = await service.SystemService.GetWorkerHealthCheck();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n\npublic async Task GetVersion()\n{\n    var result = await service.SystemService.GetVersion();\n    Assert.IsTrue(result.IsSuccessStatusCode);\n}\n```\n\n## Status\n\n![](https://buildstats.info/github/chart/StardustDL/judge0-dotnet?branch=master)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstardustdl%2Fjudge0-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstardustdl%2Fjudge0-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstardustdl%2Fjudge0-dotnet/lists"}