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が発生したプロファイルは削除されます。

適用対象

こちらもご覧ください