Table of Contents

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

objectId ObjectId

The unique identifier of the camera to delete.

Returns

Task<bool>

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

GetById(ObjectId)

Retrieves the camera associated with the specified relay identifier.

Task<Camera?> GetById(ObjectId relayId)

Parameters

relayId ObjectId

The 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

configurationRelayList List<ObjectId>

The list of configuration relay object identifiers used to look up the associated cameras.

Returns

List<Camera>

A list of cameras that correspond to the provided configuration relay identifiers.

GetPaginatedCameras(PaginationFilter)

Retrieves a paginated list of cameras based on the provided pagination filter.

Task<PaginationResponse<Camera>> GetPaginatedCameras(PaginationFilter request)

Parameters

request PaginationFilter

The 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

textToSearch string

The 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

camera Camera

The 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 null if 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

objectId ObjectId

The unique identifier of the camera to update.

camera Camera

The camera data containing the updated values to apply.

Returns

Task<Camera>

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