https://github.com/aimenux/defensiveprogrammingdemo
Using various libraries to make defensive coding
https://github.com/aimenux/defensiveprogrammingdemo
codecontracts consoleapp dawn-guard ensure-that guardclause netcore3 netframework47 pitcher vs19
Last synced: 2 days ago
JSON representation
Using various libraries to make defensive coding
- Host: GitHub
- URL: https://github.com/aimenux/defensiveprogrammingdemo
- Owner: aimenux
- License: mit
- Created: 2020-04-11T22:43:59.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-06-03T21:26:51.000Z (about 1 year ago)
- Last Synced: 2025-11-22T01:03:30.418Z (7 months ago)
- Topics: codecontracts, consoleapp, dawn-guard, ensure-that, guardclause, netcore3, netframework47, pitcher, vs19
- Language: C#
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DefensiveProgrammingDemo
```
Defensive coding using various libraries
```
I m adding `defensive coding` to a dummy service/repository sample with the following libraries :
- [CodeContracts](https://docs.microsoft.com/en-us/dotnet/framework/debug-trace-profile/code-contracts) :
a great microsoft library for making preconditions, postconditions and invariants on code but seems to be no maintained (no support for .net core)
- [Pitcher](https://github.com/akamsteeg/Pitcher) :
a library for throwing a meaningful exception when some condition is not met by code (support for .net core)
- [DawnGuard](https://github.com/safakgur/guard) :
another library for throwing a meaningful exception when some condition is not met by code (support for .net core)
- [EnsureThat](https://github.com/danielwertheim/Ensure.That) :
an extensible library for throwing a meaningful exception when some condition is not met by code (support for .net core)
- [GuardClauses](https://github.com/ardalis/GuardClauses) :
a nice library for throwing a meaningful exception when some condition is not met by code (support for .net core)
- [LightGuardClauses](https://github.com/feO2x/Light.GuardClauses) :
a rich and user friendly library for throwing a meaningful exception when some condition is not met by code (support for .net core)
- [Throw](https://github.com/amantinband/throw) :
a fluent, extensible, and customizable library for throwing a meaningful exception when some condition is not met by code (support for .net core)
**`Tools`** : vs22, net 6, net full 4.8