PersonalizationProvider.ResetUserState(String, DateTime) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, deletes Web Parts personalization data from the underlying data store based on the specified parameters.
public:
abstract int ResetUserState(System::String ^ path, DateTime userInactiveSinceDate);
public abstract int ResetUserState (string path, DateTime userInactiveSinceDate);
abstract member ResetUserState : string * DateTime -> int
Public MustOverride Function ResetUserState (path As String, userInactiveSinceDate As DateTime) As Integer
- path
- String
The path of the personalization data to be deleted. This value can be null
but cannot be an empty string ("").
- userInactiveSinceDate
- DateTime
The date indicating the last time a Web site user changed personalization data.
The number of rows deleted from the underlying data store.
This method is the abstract definition of an administrative method for deleting personalization data. Note that this method affects only user personalization data, and not shared data.
Derived implementations should follow the logic described below:
The
path
parameter cannot contain wildcard characters.If the provider exposes data from a transaction-aware data store, this method should perform its operations in a single atomic transaction.
If the
path
parameter is non-null
, then only per-user personalization records associated withpath
will be deleted.Only per-user personalization records associated with users that are considered inactive since the date indicated in the
userInactiveSinceDate
parameter will be deleted. Specifically, records where LastActivityDate is less than or equal to UserInactiveSinceDate are deleted.If both parameters are provided, then records that match both constraints are deleted.
The
path
parameter can benull
.The
path
parameter cannot be an empty string. It should be trimmed prior to performing this check.The UserInactiveSinceDate property cannot be
null
.
Produk | Versi |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET maklum balas
.NET ialah projek sumber terbuka. Pilih pautan untuk memberikan maklum balas: