ProfileProvider.GetAllInactiveProfiles メソッド

定義

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

public:
 abstract System::Web::Profile::ProfileInfoCollection ^ GetAllInactiveProfiles(System::Web::Profile::ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate, int pageIndex, int pageSize, [Runtime::InteropServices::Out] int % totalRecords);
public abstract System.Web.Profile.ProfileInfoCollection GetAllInactiveProfiles (System.Web.Profile.ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords);
abstract member GetAllInactiveProfiles : System.Web.Profile.ProfileAuthenticationOption * DateTime * int * int * int -> System.Web.Profile.ProfileInfoCollection
Public MustOverride Function GetAllInactiveProfiles (authenticationOption As ProfileAuthenticationOption, userInactiveSinceDate As DateTime, pageIndex As Integer, pageSize As Integer, ByRef totalRecords As Integer) As ProfileInfoCollection

パラメーター

authenticationOption
ProfileAuthenticationOption

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

userInactiveSinceDate
DateTime

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

pageIndex
Int32

取得する結果のページのインデックス。

pageSize
Int32

取得する結果のページのサイズ。

totalRecords
Int32

このメソッドが返されるときに、プロファイルの総数を格納します。

戻り値

非アクティブなプロファイルに関するユーザー プロファイル情報を格納している ProfileInfoCollection

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

public override ProfileInfoCollection GetAllInactiveProfiles(
    ProfileAuthenticationOption authenticationOption,
    DateTime userInactiveSinceDate,
    int pageIndex,
    int pageSize,
    out int totalRecords)
{
    totalRecords = 0;

    return new ProfileInfoCollection();
}
Public Overrides Function GetAllInactiveProfiles( _
ByVal authenticationOption As ProfileAuthenticationOption, _
ByVal userInactiveSinceDate As DateTime, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer, _
 ByRef totalRecords As Integer) As ProfileInfoCollection

  totalRecords = 0

  Return New ProfileInfoCollection()
End Function

注釈

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

によってGetAllInactiveProfiles返される結果は、 パラメーターと pageSize パラメーターによってpageIndex制限されます。 パラメーターは pageSize 、 で返されるオブジェクトの ProfileInfo 最大数を ProfileInfoCollection識別します。 パラメーターは pageIndex 、返す結果のページを識別します。0 は最初のページを識別します。 パラメーターはtotalRecords、 パラメーターと userInactiveSinceDate パラメーターに基づいて、構成された applicationNameの非アクティブなユーザー プロファイルの合計数に設定されるauthenticationOptionパラメーターoutです。 たとえば、構成された applicationNamepageIndex のユーザーが 13 人で、値が 1 で、 pageSize が 5 の場合、ProfileInfoCollection返される 6 番目から 10 番目の非アクティブなプロファイルが返されます。 パラメーターは totalRecords 13 に設定されます。

適用対象

こちらもご覧ください