Interface IHistoricalConfigChangesService
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IHistoricalConfigChangesService
- Extension Methods
Methods
DeleteHistoricalConfigChange(ObjectId)
Deletes a historical configuration change identified by the specified identifier.
Task DeleteHistoricalConfigChange(ObjectId id)
Parameters
idObjectIdThe identifier of the historical configuration change to delete.
Returns
FindLastConfigChanges(ConfigTypes)
Asynchronously retrieves the most recent historical configuration changes for the specified configuration type. Returns null if no historical changes are found for the given type.
Task<HistoricalConfigChanges?> FindLastConfigChanges(DisplayConfigEnums.ConfigTypes configTypes)
Parameters
configTypesDisplayConfigEnums.ConfigTypesThe configuration type used to look up the most recent historical changes.
Returns
- Task<HistoricalConfigChanges>
A task that represents the asynchronous operation. The task result contains the last HistoricalConfigChanges for the specified type, or null if no changes are available.
Get(ObjectId)
Asynchronously retrieves a historical configuration change entry by its unique identifier. Returns null when no matching historical configuration change is found for the specified id.
Task<HistoricalConfigChanges?> Get(ObjectId id)
Parameters
idObjectIdThe unique identifier of the historical configuration change to retrieve.
Returns
- Task<HistoricalConfigChanges>
A task that represents the asynchronous operation, containing the matching HistoricalConfigChanges or null if not found.
GetAll()
Asynchronously retrieves all historical configuration changes recorded in the system.
Task<ICollection<HistoricalConfigChanges>> GetAll()
Returns
- Task<ICollection<HistoricalConfigChanges>>
A task that represents the asynchronous operation. The task result contains a collection of all HistoricalConfigChanges entries.
GetByType(ConfigTypes, int)
Asynchronously retrieves a collection of historical configuration changes filtered by the specified configuration type.
Task<ICollection<HistoricalConfigChanges>> GetByType(DisplayConfigEnums.ConfigTypes type, int num)
Parameters
typeDisplayConfigEnums.ConfigTypesThe configuration type used to filter the historical changes.
numintThe maximum number of historical change records to return.
Returns
- Task<ICollection<HistoricalConfigChanges>>
A task that represents the asynchronous operation, containing a collection of HistoricalConfigChanges for the specified type.
GetByUser(string, ConfigTypes?, int)
Retrieves a collection of historical configuration changes associated with the specified user. Results can be filtered by configuration type and limited in count; when the configuration type is not provided, all types are considered.
Task<ICollection<HistoricalConfigChanges>> GetByUser(string user, DisplayConfigEnums.ConfigTypes? configTypes, int num)
Parameters
userstringThe identifier of the user whose historical configuration changes should be retrieved.
configTypesDisplayConfigEnums.ConfigTypes?The optional configuration type used to filter the results; if null, changes for all configuration types are returned.
numintThe maximum number of historical configuration change records to return.
Returns
- Task<ICollection<HistoricalConfigChanges>>
A task that represents the asynchronous operation, containing the collection of historical configuration changes matching the specified criteria.
InsertOne(HistoricalConfigChanges)
Inserts a single historical configuration change record into the data store. Returns the inserted record, or null if the insert could not be performed.
Task<HistoricalConfigChanges?> InsertOne(HistoricalConfigChanges historicalConfigChanges)
Parameters
historicalConfigChangesHistoricalConfigChangesThe historical configuration change entity to be inserted.
Returns
- Task<HistoricalConfigChanges>
A task that represents the asynchronous operation, containing the inserted HistoricalConfigChanges entity, or null if the insertion did not produce a result.
LogConfigChanged(string, ConfigTypes, string, string)
Logs a configuration change event, recording the user who made the change, the type of configuration affected, and the old and new configuration values.
Task LogConfigChanged(string user, DisplayConfigEnums.ConfigTypes configType, string newConfig, string oldConfig)
Parameters
userstringThe identifier of the user who made the configuration change.
configTypeDisplayConfigEnums.ConfigTypesThe type of configuration that was changed.
newConfigstringThe new configuration value after the change.
oldConfigstringThe previous configuration value before the change.
Returns
UpdateHistoricalConfigChange(HistoricalConfigChanges)
Updates an existing historical configuration change record with the provided data and returns the updated entity.
Task<HistoricalConfigChanges?> UpdateHistoricalConfigChange(HistoricalConfigChanges historicalConfigChanges)
Parameters
historicalConfigChangesHistoricalConfigChangesThe historical configuration change entity containing the updated values to be persisted.
Returns
- Task<HistoricalConfigChanges>
A task that resolves to the updated HistoricalConfigChanges, or
nullif the record was not found.