Free mag vol1 | Página 27

 CONTENTS Reflecting on Attributes Using Early Binding .................................................................588 Reflecting on Attributes Using Late Binding ..................................................................589 Putting Reflection, Late Binding, and Custom Attributes in Perspective .......................591 Building an Extendable Application ...............................................................................591 Building CommonSnappableTypes.dll .................................................................................................. 592 Building the C# Snap-In........................................................................................................................ 593 Building the Visual Basic Snap-In......................................................................................................... 593 Building an Extendable Windows Forms Application ........................................................................... 594 Summary .......................................................................................................................598  Chapter 16: Dynamic Types and the Dynamic Language Runtime .....................599 The Role of the C# dynamic Keyword............................................................................599 Calling Members on Dynamically Declared Data.................................................................................. 601 The Role of the Microsoft.CSharp.dll Assembly.................................................................................... 603 The Scope of the dynamic Keyword ..................................................................................................... 604 Limitations of the dynamic Keyword .................................................................................................... 605 Practical Uses of the dynamic Keyword ............................................................................................... 605 The Role of the Dynamic Language Runtime (DLR) .......................................................606 The Role of Expression Trees ............................................................................................................... 606 The Role of the System.Dynamic Namespace...................................................................................... 607 Dynamic Runtime Lookup of Expression Trees .................................................................................... 607 Simplifying Late-Bound Calls Using Dynamic Types .....................................................608 Leveraging the dynamic Keyword to Pass Arguments ......................................................................... 609 Simplifying COM Interoperability Using Dynamic Data ..................................................612 The Role of Primary Interop Assemblies (PIAs) .................................................................................... 613 Embedding Interop Metadata ............................................................................................................... 614 Common COM Interop Pain Points........................................................................................................ 615 COM Interop Using C# Dynamic Data.............................................................................616 xxv