List Shuffling

This is just a simple extension for lists to enable the shuffling of items within it based on the StackOverflow answer here. This relies on System.Random so isn’t as random as it could be but is fine for my purposes.

Building URIs in .NET Core

Building URIs in .NET Core. Creating URIs with parameters in .NET Core is more complicated than I’d initially expected. As a result I ended up creating my own methods based upon this Stack Overflow answer. To begin with I needed a version to return relative paths I’ve also created a Read more…

Select List Enum Tag Helper

Select list enum tag helper. If you want to have a select list in a web page which is based on all the values in an enum then you can use the built in function “Html.GetEnumSelectList” with a tag helper. public enum PushType { Notification, Image, Action } <div class=”row”> Read more…

Enum JSON Converter

In addition to the SingleOrArrayEnumConverter mentioned previously I’ve also created a version to translate enums to/from JSON using the name of the enum rather than it’s value as is the default. This can then be used to decorate your enum class like so.