Dynamic Proxy Generation
In the previous chapters, we looked at how powerful it is to have the type of metadata that the .NET runtime provides us with, combining that with the power of creating your own metadata, the capability to analyze it, and turn it into useful information or take actions based on it. We’re now going to explore even further and let code make new code based on metadata.
In this chapter, we will look into how we can take advantage of the fact that your code runs in a managed runtime environment and how that can be used to create new code at runtime after your code has been compiled.
We will cover the following topics:
- An introduction to IL and Reflection.Emit
- Creating a dynamic assembly and module
- Virtual members and overrides
- Implementing an interface
Upon completion of this chapter, you should understand the power of the .NET runtime and how you can turn metadata into new code to make you more productive.