Expression Trees

AgileMapper: a zero-configuration, highly configurable, transparent, id-aware object mapper

Regular readers of my blog (maybe even both of you) will have seen sporadic references to ‘my pet mapper project’. It’s now – finally! – in a beta stage I’m happy to talk about.

MSIs, Visual Studio Extension Manager and Possible Kim Kardashian

I’ve now reached v1.5.1 of the ReadableExpressions Debugger Visualizers, and solving a recent bug led me on a bit of an adventure. Here's the details, along with a tenuous Kim Kardashian reference.

ReadableExpressions Debugger Visualizers now in the Visual Studio Gallery

Bowing to vast, popular demand (one comment), I've now put an installer for the ReadableExpressions Debugger Visualizers on the Visual Studio Gallery.

Friendly, Readable Expression Trees

Introducing ReadableExpressions, a simple PCL which generates a friendly, readable view of an Expression Tree.

GetValueOrDefault() For An Expression of Arbitrary Length Using Expression Trees

In my most recent project we had to support classes with fairly deep object graphs where any of the nodes could validly be null. We didn't want to have lots of 'if not null' checks everywhere, so I wrote an extension method which takes an expression of any length and returns the expression value or a default value if any of the nodes are null. Here's the extension method code, along with an overview of how it works.

A Super-Fast C# Extension Method using Expression Trees to Create an instance from a Type

Having written an extension method to create an instance from a Type and been a bit underwhelmed by its performance, I looked into exactly what was happening and have now got it working much, much faster. Here's how.

A C# Extension Method using Expression Trees to Create an instance from a Type

I recently wrote a Type.GetInstance() extension method, and used the opportunity to play around with Expression Trees, which I'd recently read up on. Here's the set of extension methods I came up with, which allow you to quickly create an instance of a Type from the Type itself.