UserPreference.GetUserPreference method (Boolean)
Retrieves the Search user preference information.
Namespace: Microsoft.Office.Server.Search.Administration
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Syntax
'Declaration
Public Shared Function GetUserPreference ( _
lookupFromCache As Boolean _
) As UserPreference
'Usage
Dim lookupFromCache As Boolean
Dim returnValue As UserPreference
returnValue = UserPreference.GetUserPreference(lookupFromCache)
public static UserPreference GetUserPreference(
bool lookupFromCache
)
Parameters
lookupFromCache
Type: System.Booleantrue to look up the preference from cache first; otherwise, false to look up the preference from the database directly.
Return value
Type: Microsoft.Office.Server.Search.Administration.UserPreference
The Search user preference information.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The context of the current HTTP request is null . |
Remarks
This method calls the GetUserPreference(Boolean, SPWeb) method with the value of lookupFromCache as the first parameter to retrieve the Search user preference information.