Anyone know of any code that duplicates how the DebuggerDisplayAttribute parses and gathers the resultant string?

I would like to create a custom attribute that does nearly the sample thing. Similiar to "When a breakpoint is hit..." where you can use a variable within curly braces, as in "{variable}".

I already handle simple cases, such as "{Name}", but something like "{Foo.Name}" requires extra reflection code that I need help with.

Basically, I want to parse a string using the rules defined in the DebuggerDisplayAttribute documentation. Currently, I can parse and resolve "I am {GetName()}". I need help with something like "Foo's Name: {Foo.Name}"

Edit
Report