Class DTEnumInfo
Class DTEnumInfo
corresponds to an element of type Enum in a DTDL model.
Implements
Inherited Members
Namespace: DTDLParser.Models
Assembly: DTDLParser.dll
Syntax
public class DTEnumInfo : DTComplexSchemaInfo, IEquatable<DTEntityInfo>, IEquatable<DTSchemaInfo>, IEquatable<DTComplexSchemaInfo>, IEquatable<DTEnumInfo>
Properties
| Edit this page View SourceClassId
Get the DTMI that identifies type Enum in the version of DTDL used to define this element.
Declaration
public override Dtmi ClassId { get; }
Property Value
Type | Description |
---|---|
Dtmi | The DTMI for the DTDL type Enum. |
Overrides
| Edit this page View SourceEnumValues
Gets the values of the 'enumValues' property of the DTDL element that corresponds to this object.
Declaration
public IReadOnlyList<DTEnumValueInfo> EnumValues { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<DTEnumValueInfo> | The 'enumValues' property of the DTDL element. |
SupplementalProperties
Gets the supplemantal properties of the DTDL element that corresponds to this object.
Declaration
public override IDictionary<string, object> SupplementalProperties { get; }
Property Value
Type | Description |
---|---|
IDictionary<string, object> | A dictionary that maps each string-valued property name to an object that holds the value of the property with the given name. |
Overrides
Remarks
If the property is a literal in the DTDL model, the object holds a literal value. If the property is another DTDL element in the model, the object is the C# object that corresponds to this element.
SupplementalTypes
Gets a collection of identifiers, each of which is a Dtmi
that indicates a supplemental type that applies to the DTDL element that corresponds to this object.
Declaration
public override IReadOnlyCollection<Dtmi> SupplementalTypes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<Dtmi> | A collection of DTMIs indicating the supplemental types that apply to the DTDL element. |
Overrides
| Edit this page View SourceValueSchema
Gets the value of the 'valueSchema' property of the DTDL element that corresponds to this object.
Declaration
public DTPrimitiveSchemaInfo ValueSchema { get; }
Property Value
Type | Description |
---|---|
DTPrimitiveSchemaInfo | The 'valueSchema' property of the DTDL element. |
Methods
| Edit this page View SourceDeepEquals(DTComplexSchemaInfo)
Compares to another DTComplexSchemaInfo
object, recursing through the entire subtree of object properties.
Declaration
public override bool DeepEquals(DTComplexSchemaInfo other)
Parameters
Type | Name | Description |
---|---|---|
DTComplexSchemaInfo | other | The other |
Returns
Type | Description |
---|---|
bool | True if equal. |
Overrides
| Edit this page View SourceDeepEquals(DTEntityInfo)
Compares to another DTEntityInfo
object, recursing through the entire subtree of object properties.
Declaration
public override bool DeepEquals(DTEntityInfo other)
Parameters
Type | Name | Description |
---|---|---|
DTEntityInfo | other | The other |
Returns
Type | Description |
---|---|
bool | True if equal. |
Overrides
| Edit this page View SourceDeepEquals(DTEnumInfo)
Compares to another DTEnumInfo
object, recursing through the entire subtree of object properties.
Declaration
public virtual bool DeepEquals(DTEnumInfo other)
Parameters
Type | Name | Description |
---|---|---|
DTEnumInfo | other | The other |
Returns
Type | Description |
---|---|
bool | True if equal. |
DeepEquals(DTSchemaInfo)
Compares to another DTSchemaInfo
object, recursing through the entire subtree of object properties.
Declaration
public override bool DeepEquals(DTSchemaInfo other)
Parameters
Type | Name | Description |
---|---|---|
DTSchemaInfo | other | The other |
Returns
Type | Description |
---|---|
bool | True if equal. |
Overrides
| Edit this page View SourceEquals(DTComplexSchemaInfo)
Compares to another DTComplexSchemaInfo
object.
Declaration
public override bool Equals(DTComplexSchemaInfo other)
Parameters
Type | Name | Description |
---|---|---|
DTComplexSchemaInfo | other | The other |
Returns
Type | Description |
---|---|
bool | True if equal. |
Overrides
| Edit this page View SourceEquals(DTEntityInfo)
Compares to another DTEntityInfo
object.
Declaration
public override bool Equals(DTEntityInfo other)
Parameters
Type | Name | Description |
---|---|---|
DTEntityInfo | other | The other |
Returns
Type | Description |
---|---|
bool | True if equal. |
Overrides
| Edit this page View SourceEquals(DTEnumInfo)
Compares to another DTEnumInfo
object.
Declaration
public virtual bool Equals(DTEnumInfo other)
Parameters
Type | Name | Description |
---|---|---|
DTEnumInfo | other | The other |
Returns
Type | Description |
---|---|
bool | True if equal. |
Equals(DTSchemaInfo)
Compares to another DTSchemaInfo
object.
Declaration
public override bool Equals(DTSchemaInfo other)
Parameters
Type | Name | Description |
---|---|---|
DTSchemaInfo | other | The other |
Returns
Type | Description |
---|---|
bool | True if equal. |
Overrides
| Edit this page View SourceValidateInstance(JsonElement)
Validate a JsonElement
to determine whether it conforms to the specific Enum element defined in the model.
Declaration
public override IReadOnlyCollection<string> ValidateInstance(JsonElement instanceElt)
Parameters
Type | Name | Description |
---|---|---|
JsonElement | instanceElt | The |
Returns
Type | Description |
---|---|
IReadOnlyCollection<string> | A list of strings that each indicate a validation failure; the list is empty if the |
Overrides
Operators
| Edit this page View Sourceoperator ==(DTEnumInfo, DTEnumInfo)
Determines whether two DTEnumInfo
objects are equal.
Declaration
public static bool operator ==(DTEnumInfo x, DTEnumInfo y)
Parameters
Type | Name | Description |
---|---|---|
DTEnumInfo | x | One |
DTEnumInfo | y | Another |
Returns
Type | Description |
---|---|
bool | True if equal. |
operator !=(DTEnumInfo, DTEnumInfo)
Determines whether two DTEnumInfo
objects are not equal.
Declaration
public static bool operator !=(DTEnumInfo x, DTEnumInfo y)
Parameters
Type | Name | Description |
---|---|---|
DTEnumInfo | x | One |
DTEnumInfo | y | Another |
Returns
Type | Description |
---|---|
bool | True if not equal. |