So this became more complicated than I was expecting
changed back to .NET 4
First pass implementation
Better syntax
The checks were the wrong way around.
Documentation, le gasp