SlideShare a Scribd company logo
1 of 8
The answer is      1!
<#@ template #>                        The answer is      2!
<#@ output extension=“.txt” The answer is
                                        #>                3!
                                       The answer is      4!
<# for (int a=1; a<6; a++){#> answer isThe                5!
                                       Hello
The answer is <#= a #>!
<# } #>
<# SayHello(); #>
<#+ void SayHello() { #>
     public class Transform : TextTransformation
Hello{
       public string TransformText()
<#+ } #>
           {
               for (int a=1; a<6; a++){
               Write(“The answer is “);
               Write(a.ToString());
               Write (“!rn”);
               }
               SayHello();
               return GenerationEnvironment.ToString();
           }
           void SayHello()
           {
             Write(“Hello”);
           }
       }
Build include libraries

Package via NuGet

Enable scale out
T4 scaffolding
T4 scaffolding

More Related Content

More from Gareth Jones

Your API description isn't worth the paper it's written on
Your API description isn't worth the paper it's written onYour API description isn't worth the paper it's written on
Your API description isn't worth the paper it's written onGareth Jones
 
Graph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API EconomyGraph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API EconomyGareth Jones
 
Microsoft Education APIs
Microsoft Education APIsMicrosoft Education APIs
Microsoft Education APIsGareth Jones
 
Graph API Strategies: CQRS for the sustainable API economy
Graph API Strategies: CQRS for the sustainable API economyGraph API Strategies: CQRS for the sustainable API economy
Graph API Strategies: CQRS for the sustainable API economyGareth Jones
 
ApiDays Zurich Keynote 2017 Gareth Jones
ApiDays Zurich Keynote 2017 Gareth JonesApiDays Zurich Keynote 2017 Gareth Jones
ApiDays Zurich Keynote 2017 Gareth JonesGareth Jones
 
Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016Gareth Jones
 
Running Away from JSON APIStrat 2015 Edition
Running Away from JSON APIStrat 2015 EditionRunning Away from JSON APIStrat 2015 Edition
Running Away from JSON APIStrat 2015 EditionGareth Jones
 
Running Away from JSON (or what I learned building the OneNote API)
Running Away from JSON (or what I learned building the OneNote API)Running Away from JSON (or what I learned building the OneNote API)
Running Away from JSON (or what I learned building the OneNote API)Gareth Jones
 

More from Gareth Jones (8)

Your API description isn't worth the paper it's written on
Your API description isn't worth the paper it's written onYour API description isn't worth the paper it's written on
Your API description isn't worth the paper it's written on
 
Graph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API EconomyGraph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API Economy
 
Microsoft Education APIs
Microsoft Education APIsMicrosoft Education APIs
Microsoft Education APIs
 
Graph API Strategies: CQRS for the sustainable API economy
Graph API Strategies: CQRS for the sustainable API economyGraph API Strategies: CQRS for the sustainable API economy
Graph API Strategies: CQRS for the sustainable API economy
 
ApiDays Zurich Keynote 2017 Gareth Jones
ApiDays Zurich Keynote 2017 Gareth JonesApiDays Zurich Keynote 2017 Gareth Jones
ApiDays Zurich Keynote 2017 Gareth Jones
 
Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016
 
Running Away from JSON APIStrat 2015 Edition
Running Away from JSON APIStrat 2015 EditionRunning Away from JSON APIStrat 2015 Edition
Running Away from JSON APIStrat 2015 Edition
 
Running Away from JSON (or what I learned building the OneNote API)
Running Away from JSON (or what I learned building the OneNote API)Running Away from JSON (or what I learned building the OneNote API)
Running Away from JSON (or what I learned building the OneNote API)
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

T4 scaffolding

  • 1.
  • 2.
  • 3.
  • 4. The answer is 1! <#@ template #> The answer is 2! <#@ output extension=“.txt” The answer is #> 3! The answer is 4! <# for (int a=1; a<6; a++){#> answer isThe 5! Hello The answer is <#= a #>! <# } #> <# SayHello(); #> <#+ void SayHello() { #> public class Transform : TextTransformation Hello{ public string TransformText() <#+ } #> { for (int a=1; a<6; a++){ Write(“The answer is “); Write(a.ToString()); Write (“!rn”); } SayHello(); return GenerationEnvironment.ToString(); } void SayHello() { Write(“Hello”); } }
  • 5.
  • 6. Build include libraries Package via NuGet Enable scale out

Editor's Notes

  1. Every copy of Visual Studio comes with its own template code generation engine built in – T4. Come to this session to learn how to build up a library of productivity-enhancing code generators.Whether you’re creating Dependency Properties in WPF or adding custom exceptions, you can reduce the boilerplate code you need to write and minimize defects along the way. But how do you share these time-savers with your team and with the community? How can you customize them without the gotchas of copy and paste reuse?I’ll show you how to build a clean library, package it for sharing in the IDE and add extensibility points so you can customize as you go.
  2. Any questions beforehand…