Class XmlCodeGenerator
The code generator: a .route.xml document printed as the fluent C# it parses into — the
same traversal as the loader with a different receiver, each element printed by its own
contribution (the print face), so the parser and the generator cannot drift apart.
Readable style is for a human migrating off XML (descriptions become comments); machine style
adds #line directives so diagnostics point back at the XML. The honesty check is
mechanical: load the XML, run the generated Configure, and compare the two trees with
RouteDescriber — the tests do exactly that for every shipped example.
public static class XmlCodeGenerator
Inheritance
Methods
Generate(XDocument, string, string, CodeGenStyle, string, XmlRouteLoaderOptions?)
Generates one RouteBuilder class from a route document.
public static string Generate(XDocument document, string className, string ns, CodeGenStyle style = CodeGenStyle.Readable, string sourceName = "<inline>", XmlRouteLoaderOptions? options = null)