ProfileProvider.GetAllProfiles 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在衍生類別中覆寫時,會擷取資料來源中所有設定檔的使用者設定檔資料。
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 回的結果受限於 pageIndex
和 pageSize
參數。 參數 pageSize
會識別 在 中 ProfileInfoCollection 傳回的物件 ProfileInfo 數目上限。 參數 pageIndex
會識別要傳回的結果頁面,其中零會識別第一頁。 參數 totalRecords
是參數 out
,根據 和 userInactiveSinceDate
參數,設定為所設定 applicationName
authenticationOption
的非使用中使用者設定檔總數。 例如,如果已設定 applicationName
的使用者有 13 個,且 pageIndex
值為 1 且 pageSize
值為 5,則 ProfileInfoCollection 傳回的 會包含傳回的第六個到第十個非使用中設定檔。 參數 totalRecords
會設定為 13。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應