Επεξεργασία

Κοινή χρήση μέσω


PersonalizationAdministration.GetCountOfInactiveUserState Method

Definition

Returns a count of the per-user personalization items in the underlying data store for inactive users.

Overloads

GetCountOfInactiveUserState(DateTime)

Returns a count of the per-user personalization items in the underlying data store for inactive users, based on the parameter specified.

GetCountOfInactiveUserState(String, DateTime)

Returns a count of the per-user personalization items in the underlying data store for inactive users, based on the specified parameters.

GetCountOfInactiveUserState(DateTime)

Returns a count of the per-user personalization items in the underlying data store for inactive users, based on the parameter specified.

public:
 static int GetCountOfInactiveUserState(DateTime userInactiveSinceDate);
public static int GetCountOfInactiveUserState (DateTime userInactiveSinceDate);
static member GetCountOfInactiveUserState : DateTime -> int
Public Shared Function GetCountOfInactiveUserState (userInactiveSinceDate As DateTime) As Integer

Parameters

userInactiveSinceDate
DateTime

The last date a user's personalization information was accessed.

Returns

The number of personalization items for inactive users.

Exceptions

The provider for a personalization provider defined in configuration is not of the correct type.

-or-

The length of the string of any parameter is greater than 256 characters.

A configuration exception occurred while attempting to create and initialize an instance of one of the configured personalization providers.

-or-

The default personalization provider defined in configuration could not be found.

The default provider returned a negative number for the count.

Remarks

This method returns records where the user's LastActivityDate property value is less than or equal to the UserInactiveSinceDate property value. If UserInactiveSinceDate is set to MaxValue, a count of all users' personalization information is returned.

See also

Applies to

GetCountOfInactiveUserState(String, DateTime)

Returns a count of the per-user personalization items in the underlying data store for inactive users, based on the specified parameters.

public:
 static int GetCountOfInactiveUserState(System::String ^ pathToMatch, DateTime userInactiveSinceDate);
public static int GetCountOfInactiveUserState (string pathToMatch, DateTime userInactiveSinceDate);
static member GetCountOfInactiveUserState : string * DateTime -> int
Public Shared Function GetCountOfInactiveUserState (pathToMatch As String, userInactiveSinceDate As DateTime) As Integer

Parameters

pathToMatch
String

The path to the page with personalization state items to retrieve.

userInactiveSinceDate
DateTime

The last date a user's personalization information was accessed.

Returns

The count of the per-user personalization items in the underlying data store for inactive users.

Exceptions

pathToMatch, after trimming, is an empty string ("").

-or-

The provider for a personalization provider defined in configuration is not of the correct type.

-or-

The length of the string of any parameter is greater than 256 characters.

A configuration exception occurred while attempting to create and initialize an instance of one of the configured personalization providers.

-or-

The default personalization provider defined in configuration could not be found.

The default provider returned a negative number for the count.

Remarks

This method returns records where the page matches the specified pathtoMatch parameter and the user's LastActivityDate property value is less than or equal to the UserInactiveSinceDate property value. If UserInactiveSinceDate is set to MaxValue, a count of all users' personalization information is returned.

Note that the pathToMatch parameter can include wildcard characters. The method passes wildcard characters to the underlying data store. Wildcard character support is currently dependent on how each provider handles characters such as an asterisk (*), a percent symbol (%), or an underscore (_).

Normally, for SQL-compliant data stores, you can perform a wildcard search on a partial path with the wildcard character appearing at the beginning, the end, or the middle of the search string text in the PathToMatch property. For example, to find all paths that start with "~/vdir", the PathToMatch property would be set to "~/vdir%".

The pathToMatch parameter can be null. If set to null, the parameter is ignored when performing queries.

See also

Applies to