May be you know if the standard .net framework library / ms enterprise library contains something like this functionality:
IConvertible proxy = CodegenThatEverybodyNeed.CreateProxy<IConvertible>(
new Func<TypeCode> {...},
new Func<IFormatProvider,bool>{...} , ...
);
I'm petty sure that this task ("anonymous proxy") is common and it is clear that it is possible to have a run time realization, but do not imagine where I could meet this function...
P.S. Of course it is better to have design time realization with type checks, but I have no doubts this is impossible right now. P.P.S. "Well known" freeware libraries are also welcome.
ObejectBuilder It seems that ObjectBuilder should have this functionality but 15 minutes was not enough to understand how to learn it. http://msdn.microsoft.com/en-us/library/ff647453.aspx
May be somebody have nice sample?
EntLib Interceptions Also this code should be somewhere int Unit.Interceptions but I do not found how reuse it..
Have a look at Castle Dynamic Proxy.