Class TypeData
Represents a type definition of a device under test.
Implements
Inherited Members
Namespace: Loehnert.TypeAndResult
Assembly: Loehnert.TypeAndResult.dll
Syntax
[MessagePackObject(false)]
public class TypeData : EntityBase, INotifyPropertyChanged, ITrackable, IEquatable<TypeData>, ICanApplyID<TypeData>
Constructors
TypeData()
Initializes a new instance of the TypeData class.
Declaration
public TypeData()
Properties
Crc32
Gets the CRC.
Declaration
[IgnoreMember]
[JsonIgnore]
public uint Crc32 { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Remarks
Description
Gets or sets the description of the type.
Declaration
[Key(1)]
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Has value System.String.Empty by default.
LastChange
Gets or sets the UTC time stamp of the last change.
Declaration
[IgnoreMember]
public DateTime LastChange { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
Parameters
Gets the collection of additional parameters.
Declaration
[Key(3)]
public virtual EntityCollection<TypeDataParameter> Parameters { get; }
Property Value
Type | Description |
---|---|
EntityCollection<TypeDataParameter> |
Processes
Gets the process collection.
Declaration
[Key(2)]
public virtual EntityCollection<Process> Processes { get; }
Property Value
Type | Description |
---|---|
EntityCollection<Process> |
TypeIdentifier
Gets or sets the identifier of the type.
Declaration
[Key(0)]
public string TypeIdentifier { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
ApplyID(TypeData)
Declaration
public void ApplyID(TypeData source)
Parameters
Type | Name | Description |
---|---|---|
TypeData | source | Source object. |
CalculateCrc32()
Calculates the CRC32 checksum.
Declaration
public uint CalculateCrc32()
Returns
Type | Description |
---|---|
System.UInt32 | A CRC32 checksum. |
Clone()
Creates a deep copy.
Declaration
public TypeData Clone()
Returns
Type | Description |
---|---|
TypeData | A new cloned TypeData instance. |
Equals(TypeData)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(TypeData other)
Parameters
Type | Name | Description |
---|---|---|
TypeData | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
Boolean | true if the current object is equal to the other parameter; otherwise, false. |
Inherit(TypeData, TypeData)
Inherits type data from another type. Overwrites the additional parameters, attributes, parameters and characteristic lines of base type. Items whose keys are not contained in the base type are added to the returned type, otherwise they are overwritten. The BaseTypeParameter is set to System.String.Empty, to indicate that the type is already inherited.
Declaration
public static TypeData Inherit(TypeData baseType, TypeData overwritingType)
Parameters
Type | Name | Description |
---|---|---|
TypeData | baseType | The base type data. |
TypeData | overwritingType | The dominating type data. |
Returns
Type | Description |
---|---|
TypeData | Inherited TypeData where |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when any parameter is null. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string that represents the current object. |
Overrides
UpdataCrc32()
Calculates the CRC and sets the Crc32.
Declaration
public void UpdataCrc32()