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 的其中一個值,指定是否要傳回匿名、已驗證或是這兩種類型的設定檔。

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 回的結果受限於 pageIndexpageSize 參數。 參數 pageSize 會識別 在 中 ProfileInfoCollection 傳回的物件 ProfileInfo 數目上限。 參數 pageIndex 會識別要傳回的結果頁面,其中零會識別第一頁。 參數 totalRecords 是參數 out ,根據 和 userInactiveSinceDate 參數,設定為所設定 applicationNameauthenticationOption 的非使用中使用者設定檔總數。 例如,如果已設定 applicationName 的使用者有 13 個,且 pageIndex 值為 1 且 pageSize 值為 5,則 ProfileInfoCollection 傳回的 會包含傳回的第六個到第十個非使用中設定檔。 參數 totalRecords 會設定為 13。

適用於

另請參閱