PreferenceObjectServiceFindT Method

Spotfire 14.3 API Reference
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: 65.0.19510.3242 (65.0.19510.3242)
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: PreferenceObjectIdentifier
The 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

ExceptionCondition
ArgumentNullExceptionIf value, className or objectId is null.
ArgumentExceptionIf className is an empty string, if the preference class is not defined, or if T is of wrong type.
Version Information

Supported in: 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also

Reference