|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
intercepting the CLRHi,
I would like to know how is it possible to intercept the CLR. I want to be able to know if someone if calling open connection to SQL Server for example and then update the queries that are being sent or send some of my own queries on the opened connection. I read about the profiling API but never seen an example. also, I read it has large overhead. Is there anything that Microsoft provides or a software that I can purchase to do that ? Thanks, Gilad. Hello gilad,
This request (or at least this type of request) is one of those that Aspect Oriented Programming tries to fulfil, so you may want to search for that - there are several more or less mature products out there that do AOP for .NET. >I read about the profiling API but never seen an example. Searching Google gives me quite a list of results with information about the profiling API (http://www.google.com/search?hl=en&q=profiling+api) - several of them contain sample code. >also, I read it has large overhead. I believe that is true, but then this is characteristic of all the different approaches for doing AOP in .NET, as the runtime system itself doesn't lend itself too easily to this technology. OTOH, the whole idea of AOP is to provide high-level convenience functionality for the programmer, IOW to make his life easier - this is usually an idea that is orthogonal to that of delivering the best possible performance. Oliver Sturm |
|||||||||||||||||||||||