Marco,
There is an article on the September 2003 issue of MSDN Magazine that could
be an interesting reading for your project.
From the article summary: "In this article, the author shows how to
dynamically rewrite Microsoft Intermediate Language code on the fly using
the Profiling API of the CLR. Unlike approaches based on Reflection.Emit,
this scheme works with the existing assemblies and doesn't require the
creation of proxy or dynamic assemblies. The needs for IL code rewriting
emerges when you want to make your changes transparent to the client and
preserve the identity of classes. This technique can be used for creation of
interceptors, pre- and post-processing method calls, and code
instrumentation and verification."
Rewrite MSIL Code on the Fly with the .NET Framework Profiling API
http://msdn.microsoft.com/msdnmag/issues/03/09/NETProfilingAPI/default.aspx
Regards,
Gabriele
> Hi all,
> I want to extend a class in a dll without having the code for
[quoted text clipped - 6 lines]
> Thank you
> Marco Paci
Dino Chiesa [Microsoft] - 09 Oct 2003 22:53 GMT
Here's an example that uses CodeDom to create a wrapper class, on the fly.
The wrapper converts fields in the original type to Properties on the
wrapper type.
http://www.winisp.net/cheeso/srcview.aspx?file=MorphArray.cs

Signature
Dino Chiesa
Microsoft Developer Division
d i n o c h @ o n l i n e . m i c r o s o f t . c o m
> Marco,
>
[quoted text clipped - 12 lines]
>
> Rewrite MSIL Code on the Fly with the .NET Framework Profiling API
http://msdn.microsoft.com/msdnmag/issues/03/09/NETProfilingAPI/default.aspx
> Regards,
>
[quoted text clipped - 10 lines]
> > Thank you
> > Marco Paci
You dont need codedom if you want to "extend a class" all
you have to do is add a referance to the assembly. Then
you can extend any non-sealed class in that assembly just
as you would extend a class in your assembly. Perhaps you
already knew this and need codedom for other reasons, but
I figured I'd tell you just in case.
Nick
>-----Original Message-----
>Hi all,
[quoted text clipped - 8 lines]
>Marco Paci
>.