Namespace DTDLParser
Classes
Dtmi
Digital Twin Modeling Identifier.
DtmiReference
Describes an external reference to a DTMI and the location of the reference within a DTDL model.
ModelParser
Instances of the ModelParser
class parse models written in the DTDL language.
This class can be used to determine whether one or more DTDL models are valid, to identify specific modeling errors, and to enable inspection of model contents.
ParsingError
Provides information about a model error that was discovered during DTDL parsing.
ParsingException
Indicates that one or more model errors were discovered during DTDL parsing.
ParsingOptions
Class ParsingOptions
defines properties that can be passed into the ModelParser constructor to configure its behavior.
ResolutionException
Indicates that the resolution of a DTMI failed.
ValidationException
A call to the ValidateInstance()
method was made on a class for which instance validation is not meaningful.
Interfaces
IRootable
Interface for additional methods on elements that are allowed at the root of a model file.
Enums
DTEntityKind
Indicates the kind of Entity, meaning the concrete DTDL type assigned to the corresponding element in the model.
DTExtensionKind
Indicates the kind of extension.
ModelParsingQuirk
Enum ModelParsingQuirk
defines quirks that may change the parser's behavior to admit models that are invalid in narrowly defined ways.
Use of these quirks is strongly discouraged unless the effect and consequences are well understood.
WhenToAllow
Enum WhenToAllow
is a value type for a property that indicates when a particular syntax, function, behavior, or feature indicated by the property is allowed to be used in a DTDL model.
Delegates
DtdlParseLocator
A delegate to be provided by code that uses the ModelParser for converting a parse index and line number into a source name and line number.
DtdlResolveLocator
A delegate to be provided by code that uses the ModelParser for converting a resolve DTMI and line number into a source name and line number.
DtmiResolver
The DtmiResolver
delegate enables a client of the parser to set a callback that will be invoked when the parser encounters a context reference or a dependent reference to a DTMI for which it has no definition.
This callback will be called during execution of the Parse(IEnumerable<string>, DtdlParseLocator) API.
The resolver accepts a collection of DTMIs as an argument, so a batch of identifiers can be resolved together; this reduces the count of network round trips when resolution requires remote retrieval.
If the resolver is unable to obtain a definition for the DTMIs, it should return null for the enumeration.
DtmiResolverAsync
The DtmiResolverAsync
delegate enables a client of the parser to set a callback that will be invoked when the parser encounters a context reference or a dependent reference to a DTMI for which it has no definition.
This callback will be called during execution of the ParseAsync(IAsyncEnumerable<string>, DtdlParseLocator, CancellationToken) API.
The resolver accepts a collection of DTMIs as an argument, so a batch of identifiers can be resolved together; this reduces the count of network round trips when resolution requires remote retrieval.
If the resolver is unable to obtain a definition for the DTMIs, it should return null for the enumeration.