UserPreferencesAccess Interface

User preferences provide a way to get, store and delete preferences for an application at two different levels, iTwin and iModel.

The user preferences are separate from any iTwin or iModel configuration intended to be shared across multiple users. See Workspace for more details on shared configuration.

Note: Both the key and return type are intended to be abstract and allow any preferences to be stored. Based on this simple interface, the implementation of this interface can interpret the key as needed to store and retrieve the preferences.

Properties

Name Type Description
delete (arg: PreferenceKeyArg & ITwinIdArg & TokenArg) => Promise<void> Deletes the specified preference by key, if it exists, within the level provided.  
get (arg: PreferenceKeyArg & ITwinIdArg & TokenArg) => Promise<any> Method to get a user preference based off of a key within a namespace.  
save (arg: PreferenceArg & ITwinIdArg & TokenArg) => Promise<void> Saves the provided preference by the key within the provided level.  

Defined in

Last Updated: 21 November, 2024