Here´s a little sunday PoC I wanted to share with you: remote control a presentation using HTML5 web sockets. Ingredients: Swipe JavaScript touch slider. Microsoft.WebSockets NuGet package. Even if it´s not actively developed and only works with Windows 8 or higher. Some lines of vanilla JavaScript and C# 😉 Client-side The client (index.html) is just some […]

Ever had problem with JSON data sometimes array and sometimes object that will cause the deserialization process to fail? Anyway, if you´re to encounter this “phenomenon” it is possible to handle building a custom JsonConverter that inherits the abstract Newtonsoft.Json.JsonConverter class. Usage: And:

Here’s a little code snippet that will handle caching of objects using http runtime cache. If object exists in cache it will be returned. If not it will be reloaded using the supplied method, inserted into cache and returned back. Usage:

There are multiple ways of parsing an RSS or Atom feed in .NET like XmlDocument and XDocument classes. If you´re running .NET Framework 3.5 and above it´s also possible to use the SyndicationFeed class and it is as simple as this: Here follows a snippet to parse multiple feeds into one using the SyndicationFeed class and some LINQ (I love LINQ :-)). […]