Are there any built-in mechanisms in .Net that would allow us to write two programs, A and B. A is a process with special hooks onto which B attaches itself. This would allow B to gather whatever information those hooks provided.
In particular, it would be nice to be able to dial into another of our process and gather suchs metrics like how many times a function was called in the last X minutes, the average run length, how many items are in this or that cache, etc.