Table of Contents

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

uint

Remarks

Description

Gets or sets the description of the type.

[Key(1)]
public string Description { get; set; }

Property Value

string

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

DateTime

Parameters

Gets the collection of additional parameters.

[Key(3)]
public virtual EntityCollection<TypeDataParameter> Parameters { get; }

Property Value

EntityCollection<TypeDataParameter>

Processes

Gets the process collection.

[Key(2)]
public virtual EntityCollection<Process> Processes { get; }

Property Value

EntityCollection<Process>

TypeIdentifier

Gets or sets the identifier of the type.

[Key(0)]
public string TypeIdentifier { get; set; }

Property Value

string

Methods

ApplyID(TypeData)

Copies the ID from source to this ID.

public void ApplyID(TypeData source)

Parameters

source TypeData

Source object.

CalculateCrc32()

Calculates the CRC32 checksum.

public uint CalculateCrc32()

Returns

uint

A CRC32 checksum.

Clone()

Creates a deep copy.

public TypeData Clone()

Returns

TypeData

A new cloned TypeData instance.

Equals(TypeData)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(TypeData other)

Parameters

other TypeData

An 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

baseType TypeData

The base type data.

overwritingType TypeData

The dominating type data.

Returns

TypeData

Inherited TypeData where overwritingType dominate.

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()