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
innerIPreferenceStoremirrorIPreferenceMirrorjsIJSRuntimeloggerILoggeronSavedAction
Methods
LoadFromStoreAsync(CallbackEnvironment, IEntityContext)
public Task<PreferenceDictionary> LoadFromStoreAsync(CallbackEnvironment environment, IEntityContext context)
Parameters
environmentCallbackEnvironmentcontextIEntityContext
Returns
SaveToStoreAsync(CallbackEnvironment, IEntityContext, PreferenceDictionary)
public Task SaveToStoreAsync(CallbackEnvironment environment, IEntityContext context, PreferenceDictionary dictionary)
Parameters
environmentCallbackEnvironmentcontextIEntityContextdictionaryPreferenceDictionary