~/talk

Writing Code with Code: Getting Started with the Roslyn APIs

Talkat NDC London 2023 · 2023-01-23..01-27· [c-sharp, compilers-and-language-design]
slides:none on file

Demonstrates using the Roslyn APIs and Microsoft.CodeAnalysis.CSharp to turn a JSON/TypeScript-driven spec (processed with TS-morph) into a schema.json and then into C# syntax trees that emit thousands of classes in seconds. The pipeline targets a real Elasticsearch client: ~400 endpoints, ~2,000 data structures and a ~180,000-line spec. The generator parses the spec, builds a richer context, produces request/response/descriptor classes and test-checks via recorded integration traffic; it works for most endpoints today but needs refactoring and polishing.

AI-written summary · about

  1. 0:00Start
  2. 4:01Analyzers and Code Fixes
  3. 8:58Compiler Flow
  4. 10:48Syntax Trees
  5. 19:56Options for Code Generation
  6. 37:19Validating the Specification
  7. 39:12Code Generation Pipeline
  8. 43:49NET Code Generator
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.