Closed SebastianStehle closed 6 years ago
My impression is, that 50% of the code is for the checking preconditions ;)
:smile: yes, that could be true. I guess I get fastidious when it comes to Guard methods as it changes the stack trace but I can see your point, too + it doesn't alter the stack trace that much, you can still see where the Guard method is being called.
Feel free to have a go on this and send a pull request if you want to.
May consider the use of https://github.com/danielwertheim/Ensure.That for this item. Why implement code that is already implemented and working in various projects already?
In my fork... will be pushing in the next few days after some additional work is put to-bed.
It is not an issue, but it would help to make a guard class:
https://github.com/aspnet/EntityFramework/blob/dev/src/Shared/Check.cs
My impression is, that 50% of the code is for the checking preconditions ;)