Table of Contents

Class MirroredPreferenceStore

Namespace
The.Web.Preferences
Assembly
Instagile.Web.Client.dll

Stores preferences in a canonical async store and mirrors them to an ambient sync store. Notifies on save so that consumers can update without rereading the mirror.

public sealed class MirroredPreferenceStore : IPreferenceStore
Inheritance
MirroredPreferenceStore
Implements
Inherited Members

Constructors

MirroredPreferenceStore(IPreferenceStore, IPreferenceMirror, IJSRuntime, ILogger, Action)

Stores preferences in a canonical async store and mirrors them to an ambient sync store. Notifies on save so that consumers can update without rereading the mirror.

public MirroredPreferenceStore(IPreferenceStore inner, IPreferenceMirror mirror, IJSRuntime js, ILogger logger, Action onSaved)

Parameters

inner IPreferenceStore
mirror IPreferenceMirror
js IJSRuntime
logger ILogger
onSaved Action

Methods

LoadFromStoreAsync(CallbackEnvironment, IEntityContext)

public Task<PreferenceDictionary> LoadFromStoreAsync(CallbackEnvironment environment, IEntityContext context)

Parameters

environment CallbackEnvironment
context IEntityContext

Returns

Task<PreferenceDictionary>

SaveToStoreAsync(CallbackEnvironment, IEntityContext, PreferenceDictionary)

public Task SaveToStoreAsync(CallbackEnvironment environment, IEntityContext context, PreferenceDictionary dictionary)

Parameters

environment CallbackEnvironment
context IEntityContext
dictionary PreferenceDictionary

Returns

Task