Share via


ProfileProvider.DeleteInactiveProfiles メソッド

定義

派生クラスでオーバーライドされた場合、最後のアクティビティの日付が指定した日付以前であるプロファイルについて、すべてのユーザー プロファイル データを削除します。

public:
 abstract int DeleteInactiveProfiles(System::Web::Profile::ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate);
public abstract int DeleteInactiveProfiles (System.Web.Profile.ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate);
abstract member DeleteInactiveProfiles : System.Web.Profile.ProfileAuthenticationOption * DateTime -> int
Public MustOverride Function DeleteInactiveProfiles (authenticationOption As ProfileAuthenticationOption, userInactiveSinceDate As DateTime) As Integer

パラメーター

authenticationOption
ProfileAuthenticationOption

プロファイルの種類 (匿名、認証、またはその両方) を指定する ProfileAuthenticationOption 値の 1 つが削除されます。

userInactiveSinceDate
DateTime

アクティブでないと見なすユーザー プロファイルを識別する DateTime。 ユーザー プロファイルの LastActivityDate 値が、この日時またはそれ以前に発生している場合、このプロファイルは無効と見なされます。

戻り値

データ ソースから削除されたプロファイルの数。

次のコード例は、 メソッドの実装のメソッド シグネチャを DeleteInactiveProfiles 示しています。 完全 ProfileProvider な実装の例については、「 方法: プロファイル プロバイダーのビルドと実行の例」を参照してください。

public override int DeleteInactiveProfiles(
    ProfileAuthenticationOption authenticationOption,
    DateTime userInactiveSinceDate)
{
    return 0;
}
Public Overrides Function DeleteInactiveProfiles( _
ByVal authenticationOption As ProfileAuthenticationOption, _
ByVal userInactiveSinceDate As DateTime) As Integer

  Return 0
End Function

注釈

メソッドは DeleteInactiveProfiles 、未使用のプロファイル データをデータ ソースから削除するために使用されます。 構成ファイルで指定された の applicationName データのみが削除されます。 パラメーターは authenticationOption 、匿名プロファイルのみ、認証済みプロファイルのみ、またはすべてのプロファイルを検索するかどうかを指定します。 LastActivityDate指定したuserInactiveSinceDateパラメーター値が削除される前または前に が発生するプロファイル。

適用対象

こちらもご覧ください