List of Figures

 

Chapter 1. Metaprogramming concepts

Figure 1.1. Which system is easier to change?

Figure 1.2. DynamicConversion.htm—converting inches to millimeters

Figure 1.3. DynamicConversion.htm—injecting variables into JavaScript

Figure 1.4. DynamicConversion.htm—using JavaScript’s Math class dynamically

Figure 1.5. Enumerating the synonyms for the CodeDOM language providers using LINQPad

Figure 1.6. Cross-joining two ranges in LINQ

Figure 1.7. The results of filtering a cross-join of two ranges with a lambda predicate

Figure 1.8. Exercising the DynamicPredicate class

Figure 1.9. Simple sorting that throws an exception

Figure 1.10. The IL from writing a string to the console

Figure 1.11. The metaprogramming class called MyExpandoObject in action

Chapter 2. Exploring code and metadata with reflection

Figure 2.1. High-level design of an extensible application. New assemblies are copied to a directory, which the main application monitors for changes to load desirable additions.

Figure 2.2. Object description in the debugger. As you can see, you don’t get a lot of information if you don’t override it.

Figure 2.3. Rich description of an object in the debugger. All the readable properties are listed with their names and values.

Chapter 3. The Text Template Transformation Toolkit (T4)

Figure 3.1. The HelloWorld template and its output as shown in Visual Studio’s Solution Explorer window.