Supercharge Your Enums
It's easy with this one little trick!
I was recently talking with someone on Twitter about looking back at my old Java code. I don't miss writing Java (there's a good reason I decided to specialize in the .NET stack a decade ago), but there are a couple aspects of the language that I do remember fondly. The way enum types in Java can be more than just atomic values has always struck me as kind of cool. I've found use cases over the years where I wish C# has something similar. I've solved this need in a variety of ways, and I'll show you one of my favorites here for it's simplicity.
Integrating Wyam Into An ASP.NET MVC Site
I heard you like static sites, so I put some static site in your dynamic site
I've seen an interesting static site use case come up a few times recently where someone wants to use a static generator along with an existing dynamic site. The idea is that they would generate certain resources statically at build-time of the dynamic site and then only rely on the dynamic runtime for pages that really need it. I've long suspected that Wyam would be great in this role, particularly for ASP.NET MVC sites given that it can read the same Razor layout files. I finally got motivated enough to give this a try and will detail how to do it in this blog post. It turns out it's not hard at all and works really well once you've gotten everything set up.
Exploring the NuGet v3 Libraries, Part 3
In the first part of this series I looked at the overall design of the new libraries and how to set up your environment. In the second part I explained how to search for packages and examined some of the resources provided by the NuGet libraries. In this final part of the series, I'll dive into installing packages. This is a little bit more complicated than the activities in the previous posts because installing a package is actually a much more complex action when you take into account things like current platform and dependency chains.