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 パラメーターは、匿名プロファイルのみ、認証済みプロファイルのみ、またはすべてのプロファイルを検索するかどうかを指定します。 検索されたプロファイルのうち、指定されたLastActivityDate パラメーター値の前に発生したuserInactiveSinceDateを持つプロファイルが返されます。

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

適用対象

こちらもご覧ください