IAzureCosmosDbGetLastDeviceMessageByEventCode Method

Returns the most recently received DeviceMessageDto matching a given device and DeviceRequestType.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
Task<DeviceMessageDto?> GetLastDeviceMessageByEventCode(
	DeviceDto device,
	EventCodeDto eventCode,
	CancellationToken cancellationToken = default
)

Parameters

device  DeviceDto
The device to query.
eventCode  EventCodeDto
The device message event code that is searched.
cancellationToken  CancellationToken  (Optional)
A cancellation token.

Return Value

TaskDeviceMessageDto
An instance of DeviceMessageDto, or if no matching record was found.

See Also