Shopping cart
Your cart empty!
Terms of use dolor sit amet consectetur, adipisicing elit. Recusandae provident ullam aperiam quo ad non corrupti sit vel quam repellat ipsa quod sed, repellendus adipisci, ducimus ea modi odio assumenda.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi, cum esse possimus officiis amet ea voluptatibus libero! Dolorum assumenda esse, deserunt ipsum ad iusto! Praesentium error nobis tenetur at, quis nostrum facere excepturi architecto totam.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Inventore, soluta alias eaque modi ipsum sint iusto fugiat vero velit rerum.
Sequi, cum esse possimus officiis amet ea voluptatibus libero! Dolorum assumenda esse, deserunt ipsum ad iusto! Praesentium error nobis tenetur at, quis nostrum facere excepturi architecto totam.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Inventore, soluta alias eaque modi ipsum sint iusto fugiat vero velit rerum.
Dolor sit amet consectetur adipisicing elit. Sequi, cum esse possimus officiis amet ea voluptatibus libero! Dolorum assumenda esse, deserunt ipsum ad iusto! Praesentium error nobis tenetur at, quis nostrum facere excepturi architecto totam.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Inventore, soluta alias eaque modi ipsum sint iusto fugiat vero velit rerum.
Sit amet consectetur adipisicing elit. Sequi, cum esse possimus officiis amet ea voluptatibus libero! Dolorum assumenda esse, deserunt ipsum ad iusto! Praesentium error nobis tenetur at, quis nostrum facere excepturi architecto totam.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Inventore, soluta alias eaque modi ipsum sint iusto fugiat vero velit rerum.
Do you agree to our terms? Sign up
Summary
Metaprogramming in .NET is designed to help readers understand the basic concepts, advantages, and potential pitfalls of metaprogramming. It introduces core concepts in clear, easy-to-follow language and then it takes you on a deep dive into the tools and techniques you'll use to implement them in your .NET code. You'll explore plenty of real-world examples that reinforce key concepts. When you finish, you'll be able to build high-performance, metaprogramming-enabled software with confidence.
About the Technology
When you write programs that create or modify other programs, you are metaprogramming. In .NET, you can use reflection as well as newer concepts like code generation and scriptable software. The emerging Roslyn project exposes the .NET compiler as an interactive API, allowing compile-time code analysis and just-in-time refactoring.
About this Book
Metaprogramming in .NET is a practical introduction to the use of metaprogramming to improve the performance and maintainability of your code. This book avoids abstract theory and instead teaches you solid practices you'll find useful immediately. It introduces core concepts like code generation and application composition in clear, easy-to-follow language.
Written for readers comfortable with C# and the .NET framework—no prior experience with metaprogramming is required.
Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.
What's Inside
• Metaprogramming concepts in plain language
• Creating scriptable software
• Code generation techniques
• The Dynamic Language Runtime
About the Authors
Kevin Hazzard is a Microsoft MVP, consultant, teacher, and developer community leader in the mid-Atlantic USA. Jason Bock is an author, Microsoft MVP, and the leader of the Twin Cities Code Camp.
"An excellent way to start fully using the power of metaprogramming."—From the Foreword by Rockford Lhotka, Creator of the CSLA .NET Framework
Table of Contents
PART 1 DEMYSTIFYING METAPROGRAMMING
• Metaprogramming concepts
• Exploring code and metadata with reflection
PART 2 TECHNIQUES FOR GENERATING CODE
• The Text Template Transformation Toolkit (T4)
• Generating code with the CodeDOM
• Generating code with Reflection.Emit
• Generating code with expressions
• Generating code with IL rewriting
PART 3 LANGUAGES AND TOOLS
• The Dynamic Language Runtime
• Languages and tools
• Managing the .NET Compiler
Comments