Lightweight Code Generation
This post on .NET Undocumented talks about Lightweight Code Generation, and he mentions a solution to a pet peeve of mine.
The pattern caster:
If obj derives from the IPattern interface, than obj is returned. Otherwise, a new proxy object wraps the original object and implements the IPattern interface, which maps calls to interface methods to the corresponding methods of the original object.
This is an interesting enough subject that I'm going to research it today. This is a Whidbey feature, but I hope that I can use the Castle Project for this...
Comments
Comment preview