Click or drag to resize

Covenant Class

A simple, lightweight, and partial implementation of the Microsoft Dev Labs Contract class.
Inheritance Hierarchy

Namespace:  System.Diagnostics.Contracts
Assembly:  Neon.Common (in Neon.Common.dll) Version: 2.14.0
public static class Covenant

The Covenant type exposes the following members.


This class is intended to be a drop-in replacement for code contract assertions by simply searching and replacing "Contract." with "Covenant." in all source code. In my experience, code contracts slow down build times too much and often obsfucate async methods such that they cannot be debugged effectively using the debugger. Code Contracts are also somewhat of a pain to configure as project propoerties.

This class includes the Requires(Boolean, String), RequiresTException(Boolean, String, String) and Assert(Boolean, String) methods that can be used to capture validation requirements in code, but these methods don't currently generate any code.

See Also