Table of Contents

Class AuditingIconSettingsServiceDecorator

Namespace
Tharga.Team.Service.Audit
Assembly
Tharga.Team.Service.dll

Decorator that records changes to the site's icon settings. Reads pass through unlogged.

public class AuditingIconSettingsServiceDecorator : IIconSettingsService
Inheritance
AuditingIconSettingsServiceDecorator
Implements
Inherited Members

Remarks

What changed is recorded, not just that something did. These settings are site-wide, so "avatars look different today" is a question somebody asks weeks later — and an entry saying only "settings saved" answers none of it. The metadata carries the values as stored.

Constructors

AuditingIconSettingsServiceDecorator(IIconSettingsService, CompositeAuditLogger, IHttpContextAccessor)

public AuditingIconSettingsServiceDecorator(IIconSettingsService inner, CompositeAuditLogger auditLogger, IHttpContextAccessor httpContextAccessor)

Parameters

inner IIconSettingsService
auditLogger CompositeAuditLogger
httpContextAccessor IHttpContextAccessor

Methods

GetAsync()

The settings currently in force on this instance.

public Task<IconSettingsState> GetAsync()

Returns

Task<IconSettingsState>

SaveAsync(IconSettingsState)

Store settings and apply them to this instance immediately.

public Task SaveAsync(IconSettingsState settings)

Parameters

settings IconSettingsState

Returns

Task

Remarks

Applied here as well as stored, so whoever made the change sees it at once rather than waiting for a refresh — and on a single-instance host that means everywhere. Other instances re-read on o.Blazor.IconSettingsRefreshInterval.