Cargando…

Code generation with Roslyn /

Learn how Roslyn's new code generation capability will let you write software that is more concise, runs faster, and is easier to maintain. You will learn from real-world business applications to create better software by letting the computer write its own code based on your business logic alre...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Harrison, Nick (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: [United States] : Apress, 2017.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • At a Glance; Contents; About the Author; About the Technical Reviewer; Acknowledgments; Chapter 1: Introduction; The Problem with Business Logic; Develop/Test Deploy Takes Time; Lookup Tables Are Easier to Modify, Verify, and Deploy; Lookup Tables Can Be Slow; Having Your Cake and Eating It Too; What Is Not Covered; Summary; Chapter 2: Putting Business Logic in Tables; A Catalog of Business Logic Tables; Simple Lookup Table; Lookup Tables with Multiple Input Parameters (Decision Tables); State-Specific Business Logic; Shipping Charges; Interactive Questionnaire.
  • Compound Decision TableExpression Decision Table; Summary; Chapter 3: Pulling Table Driven Logic Into Code; Overview; Treating Lookup Tables as Enums; Lookup Data; Code; Table-Driven Hello World; Data; Code; Automated Underwriting; Data Model; Data; Underwriting Rule; Loan Code Type; Loan Code; Underwriting Rule Detail; Code; Summary; Chapter 4: An Introduction to Roslyn; The Roslyn Pipeline; How Code Generation Fits In; Getting Started with Roslyn; Syntax API; Symbol API; Binding and Analysis API; Emit API; Generating Code; Summary; Chapter 5: Generating Code; Creating Enums; Hello World.
  • Automated UnderwritingSummary; Chapter 6: Deploying Generated Code; Setting Up the Sample Solution; The Basic Flow; Loading the EmptyProject; Safely Add a New Document; Specifying Compilation Options; Reviewing the Diagnostic Messages; Emitting an Assembly; Summary; Chapter 7: Reflecting on Generated Code; Loading the Assembly; Monitoring for Changes; Discovering Types; Discovering Methods; Calling Methods; Interpreting the Results; Summary; Chapter 8: Best Practices; Defining Requirements; Always Plan on Change; Most Business Rules Are Date-Sensitive; Structuring Logic.
  • Separate Business Logic Tables from Business Entity TablesIntegrate Lookup Tables into the Entity Data Model; Avoid One True Lookup Tables (OTLT) in the Entity Data Model; An OTLT Can Be Used to Simplify Expression-Based Decision Tables; Types of Logic Tables; Use Dates; Add Comment Columns to Logic Tables; Writing Code from Structured Logic; Hand-Write Sample Code Before Generating the Code; Define an Input Interface; Not All Logic Tables Should Be Converted to Code; Generate Enums from Lookup Tables; Incorporate Comments; Fail Early; Using Roslyn; Roslyn Is the Compiler.
  • Roslyn Is Better for Code GenerationParse Sample Code; Roslyn Is Immutable; Generating Code with Roslyn; Use Simple Objects to Host Metadata; Invert Business Logic; Reduce Complexity; Reflective Best Practices; Don't Lock the Assembly; Reload the Assembly as Needed; Prefer GetTypes () to GetType (); Track Results; Index.