Interface IConfigPumpsService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IConfigPumpsService
- Extension Methods
Methods
DeletePumpConfig(ConfigPumps)
Asynchronously deletes the specified pump configuration.
Task<bool> DeletePumpConfig(ConfigPumps config)
Parameters
configConfigPumpsThe pump configuration to delete.
Returns
- Task<bool>
A task that represents the asynchronous operation. The task result contains a boolean indicating whether the deletion was successful.
GetAllPumpConfigs()
Retrieves all available pump configurations from the configuration store.
Task<List<ConfigPumps>?> GetAllPumpConfigs()
Returns
- Task<List<ConfigPumps>>
A task containing a list of ConfigPumps with all pump configurations, or
nullif no configurations are available.
GetConfigItems(string)
Asynchronously retrieves the configuration pump items associated with the specified identifier. Returns null if no configuration items are found for the given id.
Task<List<ConfigPumpItem>?> GetConfigItems(string id)
Parameters
idstringThe unique identifier used to look up the configuration items.
Returns
- Task<List<ConfigPumpItem>>
A task containing a list of ConfigPumpItem objects if found, or null if no items exist for the specified id.
GetPumpConfigById(string)
Asynchronously retrieves the pump configuration that matches the specified identifier.
Task<ConfigPumps?> GetPumpConfigById(string id)
Parameters
idstringThe unique identifier of the pump configuration to look up.
Returns
- Task<ConfigPumps>
A task that represents the asynchronous operation. The task result contains the matching ConfigPumps configuration if found; otherwise,
nullwhen no configuration exists for the given identifier.
InsertPumpConfig(ConfigPumps)
Inserts a new pump configuration into the data store.
Task<ConfigPumps?> InsertPumpConfig(ConfigPumps pumpConfig)
Parameters
pumpConfigConfigPumpsThe pump configuration to insert.
Returns
- Task<ConfigPumps>
The inserted ConfigPumps entity, or
nullif the insertion was not performed.
Map(PumpObservation)
Asynchronously maps the source PumpObservation to a new PumpObservation instance, transforming its data into the target representation.
Task<PumpObservation> Map(PumpObservation obs)
Parameters
obsPumpObservationThe source PumpObservation to be mapped.
Returns
- Task<PumpObservation>
A task that represents the asynchronous mapping operation, containing the resulting PumpObservation.
RetentionActions(PumpObservation)
Asynchronously evaluates and applies retention actions for a pump observation, returning the resulting retention outcome.
Task<ObservatitonRetentionResult?> RetentionActions(PumpObservation obs)
Parameters
obsPumpObservationThe pump observation to process for retention actions.
Returns
- Task<ObservatitonRetentionResult>
A task that represents the asynchronous operation, containing the retention result, or null if no retention action applies.
UpdatePumpConfig(ConfigPumps)
Updates the pump configuration asynchronously and returns the updated configuration.
Task<ConfigPumps?> UpdatePumpConfig(ConfigPumps pumpConfig)
Parameters
pumpConfigConfigPumpsThe pump configuration to update.
Returns
- Task<ConfigPumps>
A task that represents the asynchronous operation, containing the updated ConfigPumps, or
nullif the configuration was not found.