Class TypeData
- Namespace
- Loehnert.TypeAndResult
- Assembly
- Loehnert.TypeAndResult.dll
Represents a type definition of a device under test.
[MessagePackObject(false)]
public class TypeData : EntityBase, INotifyPropertyChanged, ITrackable, IEquatable<TypeData>, ICanApplyID<TypeData>
- Inheritance
-
TypeData
- Implements
- Inherited Members
- Extension Methods
Constructors
TypeData()
Initializes a new instance of the TypeData class.
public TypeData()
Properties
Crc32
Gets the CRC.
[IgnoreMember]
[JsonIgnore]
public uint Crc32 { get; }
Property Value
Remarks
Description
Gets or sets the description of the type.
[Key(1)]
public string Description { get; set; }
Property Value
Remarks
Has value Empty by default.
LastChange
Gets or sets the UTC time stamp of the last change.
[IgnoreMember]
public DateTime LastChange { get; set; }
Property Value
Parameters
Gets the collection of additional parameters.
[Key(3)]
public virtual EntityCollection<TypeDataParameter> Parameters { get; }
Property Value
Processes
Gets the process collection.
[Key(2)]
public virtual EntityCollection<Process> Processes { get; }
Property Value
TypeIdentifier
Gets or sets the identifier of the type.
[Key(0)]
public string TypeIdentifier { get; set; }
Property Value
Methods
ApplyID(TypeData)
public void ApplyID(TypeData source)
Parameters
source
TypeDataSource object.
CalculateCrc32()
Calculates the CRC32 checksum.
public uint CalculateCrc32()
Returns
- uint
A CRC32 checksum.
Clone()
Creates a deep copy.
public TypeData Clone()
Returns
Equals(TypeData)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(TypeData other)
Parameters
other
TypeDataAn object to compare with this object.
Returns
- bool
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 Empty, to indicate that the type is already inherited.
public static TypeData Inherit(TypeData baseType, TypeData overwritingType)
Parameters
Returns
Exceptions
- ArgumentNullException
Thrown when any parameter is null.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
UpdataCrc32()
Calculates the CRC and sets the Crc32.
public void UpdataCrc32()