Finds the one and only PreferenceObjectT in the class
defined by className that has the same value as
value and the id as objectId. If
no such object is not found, the first object in the class that has
the same value as T will be returned even if it
doesn't have the same id as objectId. If no object with
the same value as T is found, a default object
defined for the class will be returned.
Namespace: Spotfire.Dxp.Framework.Preferences
Assembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 23.18.9504.3877 (23.18.9504.3877)
Syntax
C#
public PreferenceObjectIdentifier Find<T>( string className, T value, PreferenceObjectIdentifier objectId )
Parameters
- className
- Type: SystemString
The name of the preference class for which the object will be found. - value
- Type: T
The value of the preference object to compare with. - objectId
- Type: Spotfire.Dxp.Framework.PreferencesPreferenceObjectIdentifier
The id of the preference object to compare with.
Type Parameters
- T
- The type of the preference value for this preference object.
Return Value
Type: PreferenceObjectIdentifierThe preference object that match the class, value and id given by className, value, and objectId. If no exact match is found, a best match is performed (see above).
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | If value, className or objectId is null. |
ArgumentException | If className is an empty string, if the preference class is not defined, or if T is of wrong type. |
Version Information
See Also