Contents tagged with generics
This post serves a dual purpose, to add to the list of articles in the series on Generics and Reflection. It also introduces a Fluent business logic processor I’ve built about 100 times in other incantations but I think all eventually leading up to this point. In keeping with my current trend of hypercomplicating the sublime by making giving it a Fluent interface to make it easy for reuse later on, the result was, as my friend Bill Hargett would probably say, is an object-oriented way of representing a procedure. Pretty much. So that’s our goal statement.
Pluggable development requires trickery. Sometimes naivety is a requirement in the development of pluggable solutions and, though not always the best idea, dynamically-dynamic code is the only way these problems can be solved. If for no other reason than to have a record of how to solve certain situations when they arise in my own life again, I’m going to try to put together a series of posts on how reflection and generic usage can be pretty neat together.
Mildly silly and maybe making too many assumptions though it is, I worked up a little extension method to generically evaluate (and return) the Data property of a JsonResult class. Makes life a little easier when testing JsonResult action methods on controller instances.