Show / Hide Table of Contents

Class Dtmi

Digital Twin Modeling Identifier.

Inheritance
object
Uri
Dtmi
Implements
ISpanFormattable
IFormattable
ISerializable
IComparable<Dtmi>
Inherited Members
Uri.SchemeDelimiter
Uri.UriSchemeFile
Uri.UriSchemeFtp
Uri.UriSchemeFtps
Uri.UriSchemeGopher
Uri.UriSchemeHttp
Uri.UriSchemeHttps
Uri.UriSchemeMailto
Uri.UriSchemeNetPipe
Uri.UriSchemeNetTcp
Uri.UriSchemeNews
Uri.UriSchemeNntp
Uri.UriSchemeSftp
Uri.UriSchemeSsh
Uri.UriSchemeTelnet
Uri.UriSchemeWs
Uri.UriSchemeWss
Uri.Canonicalize()
Uri.CheckHostName(string)
Uri.CheckSchemeName(string)
Uri.CheckSecurity()
Uri.Compare(Uri, Uri, UriComponents, UriFormat, StringComparison)
Uri.Equals(object)
Uri.Escape()
Uri.EscapeDataString(string)
Uri.EscapeString(string)
Uri.EscapeUriString(string)
Uri.FromHex(char)
Uri.GetComponents(UriComponents, UriFormat)
Uri.GetHashCode()
Uri.GetLeftPart(UriPartial)
Uri.GetObjectData(SerializationInfo, StreamingContext)
Uri.HexEscape(char)
Uri.HexUnescape(string, ref int)
Uri.IsBadFileSystemCharacter(char)
Uri.IsBaseOf(Uri)
Uri.IsExcludedCharacter(char)
Uri.IsHexDigit(char)
Uri.IsHexEncoding(string, int)
Uri.IsReservedCharacter(char)
Uri.IsWellFormedOriginalString()
Uri.IsWellFormedUriString(string, UriKind)
Uri.MakeRelative(Uri)
Uri.MakeRelativeUri(Uri)
Uri.Parse()
Uri.ToString()
Uri.TryCreate(string, in UriCreationOptions, out Uri)
Uri.TryCreate(string, UriKind, out Uri)
Uri.TryCreate(Uri, string, out Uri)
Uri.TryCreate(Uri, Uri, out Uri)
Uri.TryFormat(Span<char>, out int)
Uri.Unescape(string)
Uri.UnescapeDataString(string)
Uri.AbsolutePath
Uri.AbsoluteUri
Uri.Authority
Uri.DnsSafeHost
Uri.Fragment
Uri.Host
Uri.HostNameType
Uri.IdnHost
Uri.IsAbsoluteUri
Uri.IsDefaultPort
Uri.IsFile
Uri.IsLoopback
Uri.IsUnc
Uri.LocalPath
Uri.OriginalString
Uri.PathAndQuery
Uri.Port
Uri.Query
Uri.Scheme
Uri.Segments
Uri.UserEscaped
Uri.UserInfo
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: DTDLParser
Assembly: DTDLParser.dll
Syntax
public class Dtmi : Uri, ISpanFormattable, IFormattable, ISerializable, IComparable<Dtmi>

Constructors

| Edit this page View Source

Dtmi(string, bool)

Initializes a new instance of the Dtmi class from a string.

Declaration
public Dtmi(string value, bool skipValidation = false)
Parameters
Type Name Description
string value

String value of the DTMI.

bool skipValidation

Skips the validation check.

| Edit this page View Source

Dtmi(Uri, bool)

Initializes a new instance of the Dtmi class from a Uri instance.

Declaration
public Dtmi(Uri uri, bool skipValidation = false)
Parameters
Type Name Description
Uri uri

The URI to copy from.

bool skipValidation

Skips the validation check.

Properties

| Edit this page View Source

CompleteVersion

Gets the major and minor version of the DTMI as a double. The major version is in the integral portion and the minor version is in the fractional portion. The minor version is left-zero-padded so that sort order is maintained. Ex: version 2.22 is returned as 2.000022.

Declaration
public double CompleteVersion { get; }
Property Value
Type Description
double
| Edit this page View Source

Fragmentless

Gets the identifier with any fragment removed.

Declaration
public Dtmi Fragmentless { get; }
Property Value
Type Description
Dtmi
| Edit this page View Source

IsReserved

Gets a value indicating whether the DTMI is reserved for auto-generation.

Declaration
public bool IsReserved { get; }
Property Value
Type Description
bool
| Edit this page View Source

Labels

Gets the sequence of labels in the path portion of the DTMI.

Declaration
public string[] Labels { get; }
Property Value
Type Description
string[]
| Edit this page View Source

MajorVersion

Gets the major version of the DTMI as an integer.

Declaration
public int MajorVersion { get; }
Property Value
Type Description
int
| Edit this page View Source

MinorVersion

Gets the minor version of the DTMI as an integer.

Declaration
public int MinorVersion { get; }
Property Value
Type Description
int
| Edit this page View Source

Tail

Gets the name of the identifier's tail, which is the empty string if there is no fragment.

Declaration
public string Tail { get; }
Property Value
Type Description
string
Remarks

The tail is the same as the fragment without the leading #. The case of no fragment and the case of an empty fragment both yield an empty string for the tail.

| Edit this page View Source

Versionless

Gets the portion of the DTMI that preceeds the version number.

Declaration
public string Versionless { get; }
Property Value
Type Description
string

Methods

| Edit this page View Source

CompareTo(Dtmi)

Compares the current instance with another Dtmi and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Declaration
public int CompareTo(Dtmi other)
Parameters
Type Name Description
Dtmi other

The Dtmi to compare against.

Returns
Type Description
int

Negative if this instance precedes other, positive if this instance follows other, zero if position is the same.

| Edit this page View Source

TryCreateDtmi(string, out Dtmi)

Try to create a new instance of the Dtmi class from a string.

Declaration
public static bool TryCreateDtmi(string value, out Dtmi dtmi)
Parameters
Type Name Description
string value

String value of the DTMI.

Dtmi dtmi

Out parameter to receive the newly created Dtmi.

Returns
Type Description
bool

True if the string represents a valid DTMI; false if it does not.

Implements

ISpanFormattable
IFormattable
ISerializable
IComparable<T>
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX