Table of Contents

Class DeviceLink

Namespace
Geotab.Checkmate.ObjectModel
Assembly
Geotab.Checkmate.ObjectModel.dll

A DeviceLink is a relationship between two Devices over a period of time.

public class DeviceLink : EntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion, IDateTimeProvider, IDefaultable, IEntityLink
Inheritance
DeviceLink
Implements
Inherited Members

Constructors

Initializes a new instance of the DeviceLink class.

public DeviceLink()

Initializes a new instance of the DeviceLink class.

public DeviceLink(Id id, long? version, Device? device, Device? linkedDevice, DateTime? linkedFrom, DateTime? linkedTo, DeviceLinkType? linkType = null)

Parameters

id Id

The unique Id of the entity.

version long?

The version of the entity.

device Device

The Device which another Device is linked to.

linkedDevice Device

The linked Device.

linkedFrom DateTime?

The DateTime the Devices were linked.

linkedTo DateTime?

The DateTime the Devices were delinked.

linkType DeviceLinkType?

The DeviceLinkType

Properties

Gets the date the Devices were linked. This is only present so that we can implement IDateTimeProvider.

public DateTime? DateTime { get; }

Property Value

DateTime?

DateTime

Gets or sets the Device (destination) which the source Device is being linked to.

public Device? DestinationDevice { get; set; }

Property Value

Device

Device

Gets or sets the date and time the Devices were linked. Default [UtcNow].

public DateTime? FromDate { get; set; }

Property Value

DateTime?

DateTime

Gets or sets the link type

public DeviceLinkType? LinkType { get; set; }

Property Value

DeviceLinkType?

DeviceLinkType

Gets or sets the Device (source) which is being linked.

public Device? SourceDevice { get; set; }

Property Value

Device

Device

Gets or sets the date and time the Devices were delinked. Default [MaxDate].

public DateTime? ToDate { get; set; }

Property Value

DateTime?

DateTime

Methods

Creates a new object that is a copy of the current instance.

public override IEntity Clone()

Returns

IEntity

A new object that is a copy of this instance.

Populate non-required empty (null) properties with default values.

public void PopulateDefaults()