Show / Hide Table of Contents

Delegate 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.

Namespace: DTDLParser
Assembly: DTDLParser.dll
Syntax
public delegate IEnumerable<string> DtmiResolver(IReadOnlyCollection<Dtmi> dtmis)
Parameters
Type Name Description
IReadOnlyCollection<Dtmi> dtmis

A collection of DTMIs to resolve.

Returns
Type Description
IEnumerable<string>

An enumeration of JSON strings that collectively include definitions for all elements with the given DTMIs. The order is not required to match the order of the DTMIs passed to the resolver.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX