In DLR, I would like to do something like this:
class MyClass { int MyProperty { get; set; } }
In a razor I would do something like this. ( InstanceOfMyClass is some dynamic object that looks at an instance of MyClass )
@InstanceOfMyClass.MyProperty
This displays a string representation of MyProperty .
Now if I do it.
@InstanceOfMyClass.MyMissingProperty
I would like for him to display "Missing: MyMissingProperty". I would like to capture the whole expression, for example.
@InstanceOfMyClass.MyMissingProperty.MoreMissing
It might be possible to output "Missing: MyMissingProperty.MoreMissing", but this may require a lot of DLR.
Will ExpandoObject allow me to do this? If not, what do I need to do to implement this?
source share