ProfileProvider.GetAllProfiles メソッド

定義

派生クラスでオーバーライドされた場合、データ ソース内のすべてのプロファイルに関するユーザー プロファイル データを取得します。

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

パラメーター

authenticationOption
ProfileAuthenticationOption

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

pageIndex
Int32

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

pageSize
Int32

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

totalRecords
Int32

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

戻り値

データ ソース内のすべてのプロファイルに関するユーザー プロファイル情報を格納している ProfileInfoCollection

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

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

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

  totalRecords = 0

  Return New ProfileInfoCollection()
End Function

注釈

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

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

適用対象

こちらもご覧ください