Class ElementSpec

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

The public description of one format element: the single source the parser hints,
the XSD generator and the catalog all read, so they cannot drift apart. Branch and
configuration children (<when>, <param>, …) are nested specs —
they are parsed inside their parent's contribution and have no registry entry of their own.

public sealed record ElementSpec : IEquatable<ElementSpec>

Inheritance

Object→ElementSpec

Implements

Properties

AllowsSteps

public bool AllowsSteps { get; init; }

AllowsTextContent

public bool AllowsTextContent { get; init; }

Attributes

public IReadOnlyList<AttributeSpec> Attributes { get; init; }

Children

public IReadOnlyList<ElementSpec> Children { get; init; }

Kind

public XmlElementKind Kind { get; init; }

Name

public string Name { get; init; }

OpenAttributes

The element takes attributes beyond : the options of the type it names (a serializer's

public bool OpenAttributes { get; init; }

TakesEndpoint

public bool TakesEndpoint { get; init; }

Terminal

The step ends the route for the exchange (stop, rollbackAll,

public bool Terminal { get; init; }

Methods

Child(string, bool, params AttributeSpec[])

A configuration/branch child, declared inline by its parent.

public static ElementSpec Child(string name, bool allowsSteps, params AttributeSpec[] attributes)

Leaf(string, params AttributeSpec[])

A leaf with attributes only.

public static ElementSpec Leaf(string name, params AttributeSpec[] attributes)

Scope(string, params AttributeSpec[])

A scope: attributes plus the step group as content.

public static ElementSpec Scope(string name, params AttributeSpec[] attributes)

Constructors

ElementSpec(string, XmlElementKind, IReadOnlyList<AttributeSpec>, IReadOnlyList<ElementSpec>, bool, bool, bool)

The public description of one format element: the single source the parser hints,