{"id":19654255,"url":"https://github.com/aimenux/defensiveprogrammingdemo","last_synced_at":"2026-06-09T01:01:43.553Z","repository":{"id":116559885,"uuid":"254968149","full_name":"aimenux/DefensiveProgrammingDemo","owner":"aimenux","description":"Using various libraries to make defensive coding","archived":false,"fork":false,"pushed_at":"2025-06-03T21:26:51.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-22T01:03:30.418Z","etag":null,"topics":["codecontracts","consoleapp","dawn-guard","ensure-that","guardclause","netcore3","netframework47","pitcher","vs19"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aimenux.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-11T22:43:59.000Z","updated_at":"2025-06-03T21:26:53.000Z","dependencies_parsed_at":"2023-07-08T16:00:22.795Z","dependency_job_id":null,"html_url":"https://github.com/aimenux/DefensiveProgrammingDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aimenux/DefensiveProgrammingDemo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FDefensiveProgrammingDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FDefensiveProgrammingDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FDefensiveProgrammingDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FDefensiveProgrammingDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aimenux","download_url":"https://codeload.github.com/aimenux/DefensiveProgrammingDemo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aimenux%2FDefensiveProgrammingDemo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34086664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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":["codecontracts","consoleapp","dawn-guard","ensure-that","guardclause","netcore3","netframework47","pitcher","vs19"],"created_at":"2024-11-11T15:16:45.663Z","updated_at":"2026-06-09T01:01:43.547Z","avatar_url":"https://github.com/aimenux.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DefensiveProgrammingDemo\n```\nDefensive coding using various libraries\n```\n\nI m adding `defensive coding` to a dummy service/repository sample with the following libraries :\n- [CodeContracts](https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/code-contracts) :\na great microsoft library for making preconditions, postconditions and invariants on code but seems to be no maintained (no support for .net core)\n- [Pitcher](https://github.com/akamsteeg/Pitcher) :\na library for throwing a meaningful exception when some condition is not met by code (support for .net core)\n- [DawnGuard](https://github.com/safakgur/guard) :\nanother library for throwing a meaningful exception when some condition is not met by code (support for .net core)\n- [EnsureThat](https://github.com/danielwertheim/Ensure.That) :\nan extensible library for throwing a meaningful exception when some condition is not met by code (support for .net core)\n- [GuardClauses](https://github.com/ardalis/GuardClauses) :\na nice library for throwing a meaningful exception when some condition is not met by code (support for .net core)\n- [LightGuardClauses](https://github.com/feO2x/Light.GuardClauses) :\na rich and user friendly library for throwing a meaningful exception when some condition is not met by code (support for .net core)\n- [Throw](https://github.com/amantinband/throw) :\na fluent, extensible, and customizable library for throwing a meaningful exception when some condition is not met by code (support for .net core)\n\n**`Tools`** : vs22, net 6, net full 4.8","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimenux%2Fdefensiveprogrammingdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faimenux%2Fdefensiveprogrammingdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faimenux%2Fdefensiveprogrammingdemo/lists"}