Class RestXmlContribution

Assembly: redb.Route.Http.dll

The <rest> element (the REST DSL of this package): a
container-level contribution — it lives beside <route> and applies to the
route BUILDER, spawning the HTTP consumer routes the fluent Rest(basePath, …) would.
A verb child handles its request either with to= or with inline steps — one of the
two, never both.

public sealed class RestXmlContribution : IXmlTopLevelContribution, IXmlElementContribution

Inheritance

Object→RestXmlContribution

Implements

Properties

GeneratedUsings

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

public IReadOnlyList<string> GeneratedUsings { get; }

Kind

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

public XmlElementKind Kind { get; }

Name

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

public string Name { get; }

Spec

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

public ElementSpec Spec { get; }

Methods

Apply(XElement, IRouteDefinition, XmlParseContext)

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

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

ApplyTopLevel(XElement, RouteBuilder, XmlParseContext)

Applies the container-level element to the builder.

public void ApplyTopLevel(XElement element, RouteBuilder builder, XmlParseContext context)

Print(XElement, XmlCodeWriter)

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

public void Print(XElement element, XmlCodeWriter code)