Is it possible to overload how a type resolves properties when cast to dynamic?
Basically what I am trying to do is something like ExpandoObject
where you can access new properties on the fly, but instead of those properties being whatever gets assigned to them, I want them all to be collections of strings, and when you access one, it calls a dictionary web service which returns all of the definitions of the word. I want it to be dynamic so that you can specify any word at all.
I'm thinking the usage would be something like this:
dynamic dictionary = new DictionaryWebservice();
var awesome = dictionary.awesome;
foreach(var definition in awesome)
{
// add definition to my output
}
Is this possible?