次の方法で共有


ProfileProvider.GetNumberOfInactiveProfiles メソッド

定義

派生クラスでオーバーライドされたときに、最後のアクティビティの日付が指定した日付またはそれ以前であるプロファイルの数を返します。

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

パラメーター

authenticationOption
ProfileAuthenticationOption

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

userInactiveSinceDate
DateTime

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

戻り値

最後のアクティビティの日付が指定した日付またはそれ以前であるプロファイルの数。

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

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

  Return 0
End Function

注釈

メソッドは GetNumberOfInactiveProfiles 、未使用のすべてのユーザー プロファイルの数を取得するために使用されます。 構成ファイルで指定された の applicationName データのみが返されます。 パラメーターは authenticationOption 、匿名プロファイルのみ、認証済みプロファイルのみ、またはすべてのプロファイルを検索するかどうかを指定します。 検索されたプロファイルのうち、指定されたuserInactiveSinceDateパラメーター値の上または前に発生した を持つLastActivityDateプロファイルがカウントされます。

適用対象

こちらもご覧ください