Introduction |
|
1 | (1) |
|
|
1 | (1) |
|
|
2 | (3) |
|
|
5 | (18) |
|
|
5 | (5) |
|
|
6 | (4) |
|
|
10 | (1) |
|
|
11 | (6) |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
12 | (2) |
|
|
14 | (3) |
|
|
17 | (1) |
|
|
17 | (3) |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
20 | (3) |
|
Examining Assemblies, Objects and Types |
|
|
23 | (34) |
|
Examining Assembly Metadata |
|
|
24 | (7) |
|
|
25 | (6) |
|
|
31 | (5) |
|
|
31 | (1) |
|
The Get Type() Method and Operator |
|
|
31 | (1) |
|
The GetInterfaces() Method |
|
|
32 | (1) |
|
|
32 | (1) |
|
|
32 | (4) |
|
Examining Class Member Metadata |
|
|
36 | (17) |
|
|
37 | (1) |
|
The BindingFlags Enumeration |
|
|
38 | (2) |
|
|
40 | (3) |
|
|
43 | (2) |
|
|
45 | (2) |
|
|
47 | (1) |
|
The ConstructorInfo Class |
|
|
48 | (1) |
|
|
49 | (2) |
|
|
51 | (2) |
|
|
53 | (4) |
|
|
57 | (34) |
|
Why Invoke Members Using Reflection? |
|
|
58 | (1) |
|
Invoking Members Dynamically |
|
|
59 | (23) |
|
Invoking Class Members Using the Info Classes |
|
|
59 | (1) |
|
Invoking Methods Using MethodInfo |
|
|
59 | (2) |
|
Invoking Properties Using PropertyInfo |
|
|
61 | (1) |
|
Invoking Fields Using FieldInfo |
|
|
62 | (1) |
|
Invoking Class Members Using InvokeMember() |
|
|
63 | (1) |
|
Invoking Methods Using InvokeMember() |
|
|
64 | (6) |
|
Manipulating Property Values Using InvokeMember() |
|
|
70 | (6) |
|
Manipulating Field Values Using InvokeMember() |
|
|
76 | (6) |
|
Reflective Invocation at a Price |
|
|
82 | (6) |
|
|
83 | (5) |
|
|
88 | (3) |
|
|
91 | (26) |
|
|
92 | (6) |
|
Creating Assembly References |
|
|
92 | (1) |
|
Application Configuration Files and Binding |
|
|
92 | (1) |
|
|
93 | (2) |
|
Partially Referencing Assemblies |
|
|
95 | (1) |
|
Methods Used For Dynamic Assembly Loading |
|
|
95 | (1) |
|
Instantiating Classes Dynamically |
|
|
96 | (2) |
|
|
98 | (17) |
|
Advantages of Using the Abstract Factory Pattern with Dynamic Assembly Loading |
|
|
100 | (1) |
|
A Simple Abstract Factory Pattern in VB.NET |
|
|
100 | (3) |
|
Implementing the Abstract Factory Pattern with Dynamic Assembly Loading in VB.NET |
|
|
103 | (12) |
|
|
115 | (2) |
|
|
117 | (48) |
|
|
119 | (15) |
|
Syntax for Using Attributes |
|
|
122 | (7) |
|
Testing a Data Type for Standard Attributes |
|
|
129 | (5) |
|
Using Predefined .NET Attributes |
|
|
134 | (20) |
|
Understanding Attribute Class Definitions |
|
|
134 | (1) |
|
Understanding Attribute Class Syntax |
|
|
134 | (6) |
|
Passing Arguments into Attributes |
|
|
140 | (3) |
|
Using Attributes to Control the Compiler |
|
|
143 | (5) |
|
Defining and Using Assembly Attributes |
|
|
148 | (6) |
|
Defining New Custom Attributes |
|
|
154 | (8) |
|
|
162 | (3) |
|
|
165 | (60) |
|
Investigating the .NET Component Model |
|
|
166 | (15) |
|
Components, Controls, and Classes |
|
|
166 | (2) |
|
Using Reflection with the Component Model |
|
|
168 | (1) |
|
Obtaining Metadata for Types, Properties, and Events |
|
|
169 | (6) |
|
Using Metadata to Write Generic Code |
|
|
175 | (6) |
|
|
181 | (40) |
|
Defining a Component Class |
|
|
182 | (6) |
|
Storing Components in a Container |
|
|
188 | (1) |
|
Using the Standard Container Class to Host Components |
|
|
189 | (2) |
|
Defining a Custom Container Class to Host Components |
|
|
191 | (6) |
|
Using Components in Visual Studio .NET |
|
|
197 | (1) |
|
Adding a Component to the Toolbox in Visual Studio .NET |
|
|
197 | (1) |
|
Adding Component Objects to an Application |
|
|
198 | (2) |
|
Defining Properties and Events for a Component |
|
|
200 | (7) |
|
Defining Converter Classes for Components |
|
|
207 | (1) |
|
Defining the TelephoneNumber Class |
|
|
207 | (1) |
|
Defining the TelephoneNumberConverter Class |
|
|
208 | (5) |
|
Defining the Address Class |
|
|
213 | (1) |
|
Defining the AddressConverter Class |
|
|
214 | (4) |
|
Testing the Final Employee Component Class |
|
|
218 | (3) |
|
|
221 | (4) |
Appendix: Support, Errata, and Code Download |
|
225 | (4) |
|
How to Download the Sample Code for the Book |
|
|
225 | (1) |
|
|
226 | (1) |
|
|
226 | (1) |
|
|
227 | (2) |
Index |
|
229 | |