Chapter 4. Generating code with the CodeDOM

This chapter covers

  • Understanding the CodeDOM
  • The code providers classes
  • Adding objects to a code graph
  • Metaprogramming with the CodeDOM

Web browsers have a Document Object Model (DOM) for creating windows and managing the navigation between pages. HTML has a DOM for describing the content and structure of those pages. JavaScript has a DOM for automating the others. These models are appropriately called DOMs because they’re technologies for the World Wide Web, which is a largely document-oriented system.

Given the range of roles that a DOM can fill, what do you think Microsoft’s CodeDOM does? It could be used to describe code. As you learned in chapters 1 and 2, .NET provides a rich metadata ...

Get Metaprogramming in .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.