Adds a PreferenceObject T to the current user's
personal defined set of objects. The added object will be stored
locally until synchronized with the server, which occurs immediately
if the application is connected to the server, or at the next login
if it is not.
Namespace: Spotfire.Dxp.Framework.PreferencesNote that the preference object being added must be globally unique identified by its class and its name. If an object with the same name already has been added, the object is only added to the local cache and never synchronized with the server.
Assembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 18.10.8513.5432 (18.10.8513.5432)
Syntax
Parameters
- preferenceObject
- Type: Spotfire.Dxp.Framework.Preferences PreferenceObject T
The preference object to add. This object may not be null or an exeption is thrown.
Type Parameters
- T
- The type of the preference value for this preference object. The type must be serializable.
Exceptions
Exception | Condition |
---|---|
System ArgumentNullException | If preferenceObject is null. |
System ArgumentException | If a PreferenceObject T with the same Id already has been added, or if T is incorrect, for example it does not comply with the type that has previously been registered with the default preference object. |
System InvalidOperationException | If the preferenceObject is marked as a default object but a default object already exists either at application level or at user level. |
Version Information
See Also