Table of Contents

Interface IIconSettingsStore

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Where the site's IconSettings are kept so they survive a restart. The built-in default (MongoIconSettingsStore in Tharga.Team.MongoDB) stores them in the database; a host can replace it to keep them somewhere else.

public interface IIconSettingsStore

Remarks

Site-level, not per team. IconSettings is one object for the whole application and IconSubject carries no team, so there is exactly one stored value and no key to read it by.

A host that never saves anything is unaffected. Nothing is stored until somebody changes a setting, and LoadAsync(CancellationToken) returns null for that, which leaves the values configured at startup in force. Once something is saved, the stored value wins at the next start — which is the point of saving it, and the one behaviour change to say out loud in release notes.

Methods

LoadAsync(CancellationToken)

The stored settings, or null when nothing has been saved.

Task<IconSettingsState> LoadAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<IconSettingsState>

SaveAsync(IconSettingsState, CancellationToken)

Replace the stored settings.

Task SaveAsync(IconSettingsState settings, CancellationToken cancellationToken = default)

Parameters

settings IconSettingsState
cancellationToken CancellationToken

Returns

Task