Table of Contents

Interface IDeviceService

Namespace
adas_core.Application.Services.Interfaces
Assembly
adas-core.Application.dll
public interface IDeviceService
Extension Methods

Methods

Create(DeviceDto)

Creates a new Device from the provided DeviceDto.

Task<Device?> Create(DeviceDto device)

Parameters

device DeviceDto

The data transfer object containing the information used to create the device.

Returns

Task<Device>

A task that represents the asynchronous create operation. The task result contains the created Device, or null if the device could not be created.

Delete(ObjectId)

Asynchronously deletes the object identified by the specified identifier.

Task<bool> Delete(ObjectId objectId)

Parameters

objectId ObjectId

The unique identifier of the object to delete.

Returns

Task<bool>

A task that represents the asynchronous delete operation. The result is true if the object was deleted; otherwise, false.

ReceiveEvent(DeviceDto)

Processes an incoming event for the specified device and returns the associated Device. Returns null when the device referenced by the event cannot be found.

Task<Device?> ReceiveEvent(DeviceDto device)

Parameters

device DeviceDto

The device data transfer object carrying the event information to be processed.

Returns

Task<Device>

A task that represents the asynchronous operation, containing the resolved Device or null if no matching device was found.

Update(DeviceDto)

Updates an existing device using the provided data transfer object.

Task<Device?> Update(DeviceDto device)

Parameters

device DeviceDto

The data transfer object containing the updated device information.

Returns

Task<Device>

A task that represents the asynchronous operation. The task result contains the updated device, or null if the device was not found.