Interface IXmlElementContribution

Namespace: redb.Route.Xml
Assembly: redb.Route.Xml.dll

One XML element of the route format: its name, kind, and the parse action that turns the
element into calls on the existing fluent DSL. The core registers its own elements through
this same contract; a package with DSL of its own (Cache, Templates, …) registers its
elements via . A contribution only calls DSL —
it never carries semantics of its own.

public interface IXmlElementContribution

Properties

GeneratedUsings

The namespaces the printed C# needs (using lines the generator adds to the file

IReadOnlyList<string> GeneratedUsings { get; }

Kind

The element's kind — metadata for the schema, catalog and editor.

XmlElementKind Kind { get; }

Name

The element's local name (to, filter). Case-sensitive, camelCase.

string Name { get; }

Spec

The element's public description for the schema, the catalog and the editor. The

ElementSpec Spec { get; }

Methods

Apply(XElement, IRouteDefinition, XmlParseContext)

Applies the element to the route under construction and returns the current position for

IRouteDefinition Apply(XElement element, IRouteDefinition current, XmlParseContext context)

Print(XElement, XmlCodeWriter)

Prints the element as the fluent C# it parses into — the third face of the

void Print(XElement element, XmlCodeWriter code)