Interface ICameraService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface ICameraService
- Extension Methods
Methods
DeleteCamera(ObjectId)
Deletes a camera identified by the specified object identifier.
Task<bool> DeleteCamera(ObjectId objectId)
Parameters
objectIdObjectIdThe unique identifier of the camera to delete.
Returns
- Task<bool>
A task that represents the asynchronous delete operation. The result is
trueif the camera was successfully deleted; otherwise,false.
GetById(ObjectId)
Retrieves the camera associated with the specified relay identifier.
Task<Camera?> GetById(ObjectId relayId)
Parameters
relayIdObjectIdThe unique identifier of the relay used to look up the camera.
Returns
- Task<Camera>
A task that represents the asynchronous operation. The task result contains the Camera if a matching record is found; otherwise,
null.
GetCameraInList(List<ObjectId>)
Retrieves the list of cameras associated with the specified configuration relay identifiers.
List<Camera> GetCameraInList(List<ObjectId> configurationRelayList)
Parameters
configurationRelayListList<ObjectId>The list of configuration relay object identifiers used to look up the associated cameras.
Returns
GetPaginatedCameras(PaginationFilter)
Retrieves a paginated list of cameras based on the provided pagination filter.
Task<PaginationResponse<Camera>> GetPaginatedCameras(PaginationFilter request)
Parameters
requestPaginationFilterThe pagination filter containing the page size, page number, and optional search criteria used to query cameras.
Returns
- Task<PaginationResponse<Camera>>
A task that represents the asynchronous operation. The task result contains a PaginationResponse<T> with the requested page of cameras and pagination metadata.
GetSearchByNameCameras(string)
Asynchronously retrieves a list of cameras whose names match the specified search text.
Task<List<Camera>> GetSearchByNameCameras(string textToSearch)
Parameters
textToSearchstringThe text used to search camera names.
Returns
- Task<List<Camera>>
A task that represents the asynchronous operation. The task result contains a list of Camera objects matching the search criteria; an empty list is returned if no matches are found.
InsertCamera(Camera)
Inserts a new camera into the system asynchronously.
Task<Camera?> InsertCamera(Camera camera)
Parameters
cameraCameraThe camera entity to insert.
Returns
- Task<Camera>
A task that represents the asynchronous operation. The task result contains the inserted camera with its generated identifier, or
nullif the camera could not be inserted.
UpdateCameraById(ObjectId, Camera)
Updates an existing camera identified by the specified object identifier with the provided camera data. Returns null when no camera with the given identifier exists.
Task<Camera?> UpdateCameraById(ObjectId objectId, Camera camera)
Parameters
objectIdObjectIdThe unique identifier of the camera to update.
cameraCameraThe camera data containing the updated values to apply.