Thursday, January 02, 2014

Dynamic Object with custom object graph and loose rule option

Recently, I need this custom dynamic object to parse my razor model which require a loose type and object graph.

such as
Model.ConnectionString.Test
Model.ConnectionString
Model.ConnectionString.Test2

if there is no value, it will give empty string instead of error when calling RazorEngine.Parse()

Here is the dynamic object, use it when you really need it.