Interface ISectionStore
- Namespace
- Arc4u.Configuration.Store
- Assembly
- Arc4u.Configuration.Store.dll
A contract to (re)read or construct the collection of SectionEntitys from persistent storage
public interface ISectionStore
- Extension Methods
Methods
Add(IEnumerable<SectionEntity>)
This is called to add the initial set of section entities. It is not intended to be called from user code.
void Add(IEnumerable<SectionEntity> entities)
Parameters
entitiesIEnumerable<SectionEntity>
GetAll()
Get all sections in the database for a specific version
List<SectionEntity> GetAll()
Returns
- List<SectionEntity>
The list of all section entities. Modifying this list has no effect on the store
GetAsync(string, CancellationToken)
Get the contents of a specific section
Task<SectionEntity?> GetAsync(string key, CancellationToken cancellationToken)
Parameters
keystringcancellationTokenCancellationToken
Returns
- Task<SectionEntity>
the specific SectionEntity or null if there is no such section.
ResetAsync(CancellationToken)
Reset the store (i.e. remove all the SectionEntity records, causing the app to revert to the initial data
Task ResetAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken
Returns
UpdateAsync(IEnumerable<SectionEntity>, CancellationToken)
Update one or more section entities in the store
Task UpdateAsync(IEnumerable<SectionEntity> entities, CancellationToken cancellationToken)
Parameters
entitiesIEnumerable<SectionEntity>cancellationTokenCancellationToken