Interface IDeviceService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IDeviceService
- Extension Methods
Methods
Create(DeviceDto)
Task<Device?> Create(DeviceDto device)
Parameters
deviceDeviceDtoThe 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
objectIdObjectIdThe unique identifier of the object to delete.
Returns
- Task<bool>
A task that represents the asynchronous delete operation. The result is
trueif 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
deviceDeviceDtoThe 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
nullif no matching device was found.
Update(DeviceDto)
Updates an existing device using the provided data transfer object.
Task<Device?> Update(DeviceDto device)
Parameters
deviceDeviceDtoThe data transfer object containing the updated device information.