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
DeviceLink()
Initializes a new instance of the DeviceLink class.
public DeviceLink()
DeviceLink(Id, long?, Device?, Device?, DateTime?, DateTime?, DeviceLinkType?)
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
IdThe unique Id of the entity.
version
long?The version of the entity.
device
DevicelinkedDevice
DeviceThe linked Device.
linkedFrom
DateTime?linkedTo
DateTime?linkType
DeviceLinkType?The DeviceLinkType
Properties
DateTime
Gets the date the Devices were linked. This is only present so that we can implement IDateTimeProvider.
public DateTime? DateTime { get; }
Property Value
DestinationDevice
public Device? DestinationDevice { get; set; }
Property Value
FromDate
Gets or sets the date and time the Devices were linked. Default [UtcNow].
public DateTime? FromDate { get; set; }
Property Value
LinkType
Gets or sets the link type
public DeviceLinkType? LinkType { get; set; }
Property Value
SourceDevice
Gets or sets the Device (source) which is being linked.
public Device? SourceDevice { get; set; }
Property Value
ToDate
Gets or sets the date and time the Devices were delinked. Default [MaxDate].
public DateTime? ToDate { get; set; }
Property Value
Methods
Clone()
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.
PopulateDefaults()
Populate non-required empty (null) properties with default values.
public void PopulateDefaults()