Nick Harrison is a Software Consultant with over 20 years experience developing software for companies large banks to small startups in industries ranging from Mortgage Banking to Insurance Technology. He has done full stack development on the DotNet platform since version one first went gold.
Roslyn opens up some great possibilities for Code Generation so there is some overlap between the two technologies but this does not mean that they don't play well together. In fact they play well together. In this presentation we will explore using Roslyn to feed metadata to T4 templates. Roslyn proves to be a much better source for Metadata than the Code Model or Reflection. We will also explore using T4 to simplify implementing Code Fixes associated. Using T4 we can allow users of our code fix to have some control over what the correction looks like. The SyntaxTree for the code fix can come from the output of running a T4 template.