Hier soir est sortie une nouvelle release de Code Contracts, à télécharger ici.
Pour info, la release note:
Release 1.2.30113.1 (Jan 13, 2010) Contracts
- Silverlight 4 support added, Silverlight2 dropped.
- We now have a set of contract reference assemblies for the different target frameworks (3.5, 4.0, Silverlight 3.0, Silverlight 4.0). This allows contracts on newer APIs and avoids problems where the rewriter added the wrong references to the target assembly.
- Contract invariant methods now must be private.
- Invariants on auto properties are turned into pre and post conditions of the corresponding setter and getter. This permits using auto properties with contracts.
- Added more contracts to System.Linq, System.Net, System.Collections, System.Data, System.Math namespaces
- Fixed issues of referencing v3.5 assemblies with contracts from v4.0 projects
- Tweaks to extraction of contracts from VB constructors
Runtime Checker
- Makes sure contract invariant methods are not called directly
- Object invariants are now delayed until the end of the constructor to avoid checking them prematurely
- Fixes to contract inheritance that would generate bad IL.
- Avoid FxCop warnings about catching all exceptions in OldValue expressions
- Initial support for ContractIgnoredAttribute added (see documentation)
- Fix in rewriting attributes with arrays of enums
- Fixed codegen issues when removing Assert/Assumes from code
Documentation Generation
- Fixed path problems
- Fixed inheritance problems
Static Checker
- Improved handling of IsNan
- Improved error messages now include the condition in all cases (not just for other assemblies)
- Improved interval analysis
- Improved handling of box operations
- Squigglies now work in VS2010
- Fixed handling of unicode error messages in the output
- Better handling of IntPtr and UIntPtr
- Better handling of inferred mutations at method calls
- Masking of warnings at the assembly level using SuppressMessage now supported for global warnings