The Morning Brew #2051
Posted by Chris Alcock on Monday 14th March 2016 at 09:30 am | Tagged as: .NET, Development, Morning Brew
Information
- Scheduling a Webjob on Windows Azure Pack Websites V2 Update Rollup 9 – Andrew Westgarth takes a look at getting scheduling capabilities with Azure Web Jobs on Azure Pack websites using the Kudu egnine
- The week in .NET – 3/8/2016 – Bertrand Le Roy shares some of the latest .NET news in his weekly post, taking a look at ‘Humanitarian Toolbox’s allReady’ as the project of the week, as well as sharing links to recent articles
- What’s New in SQL Server 2016 Release Candidate (RC0) – Damian Widera shares some links to the latest release candidate of SQL Server 2016, as well as sharing links to blog posts and articles about some of the changes and new features.
- Composition in Postal.NET – Ricardo Peres shares an update on Postal.NET, his pub/sub/domain events portable class library inspired by Postal.js, adding in a new feature of Composition which gives something like a lightweight implementation of sagas.
- Visual Studio now speaks the R language! – Brian Swiger highlights the new support for the R programming language within the Visual Studio IDE
- Marten on DotNetRocks – Jeremy D Miller highlights his recent appearance on the .NET Rocks podcast to discuss his Marten document persistence store backed onto Postgresql
- Detecting Liskov Substitution Principle Violations with Code Contracts – Arkadiusz KaÉ«kus takes a look at the Liskov Substitution Principle, and how violations of this principle can lead to surprising and unpredictable behaviour in code, and takes a look at how Code Contracts can help protect against this type of mistake
- Routemeister optimizations & Reply to please compare Routemesiter with MediatR – Daniel Wertheim share atn updated version of Routemesiter, his library for in-process message sending, improving performance, and comparing it to some similar libraries in the space.
The warning shown in “Detecting Liskov Substitution Principle Violations with Code Contracts” is generated because he cannot add a Requires clause in an overridden method as it, ironically, violates the Liskov Substitution Principle.
The contract will still be validated but in its present form won’t trigger a violation. It has to be changed to either:
Contract.Requires(!fluid.GetType().IsSubclassOf(typeof(Alcohol));
or
Contract.Requires(!typeof(Alcohol).IsAssignableFrom(fluid.GetType()));