Reducing C# boiler plate code