ProfileProvider.GetAllProfiles Metoda

Definicja

Po zastąpieniu w klasie pochodnej pobiera dane profilu użytkownika dla wszystkich profilów w źródle danych.

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

Parametry

authenticationOption
ProfileAuthenticationOption

ProfileAuthenticationOption Jedna z wartości, określająca, czy są zwracane anonimowe, uwierzytelnione, czy oba typy profilów.

pageIndex
Int32

Indeks strony wyników do zwrócenia.

pageSize
Int32

Rozmiar strony wyników do zwrócenia.

totalRecords
Int32

Gdy ta metoda zostanie zwrócona, zawiera łączną liczbę profilów.

Zwraca

Informacje ProfileInfoCollection o profilu użytkownika dla wszystkich profilów w źródle danych.

Przykłady

Poniższy przykład kodu przedstawia podpis metody dla implementacji GetAllProfiles metody . Przykład pełnej ProfileProvider implementacji można znaleźć w temacie How to: Build and Run the Profile Provider Example (Instrukcje: kompilowanie i uruchamianie dostawcy profilu).

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

Uwagi

Metoda służy do pobierania GetAllProfiles informacji o profilu dla wszystkich profilów. Zwracane są tylko dane określone applicationName w pliku konfiguracji. Parametr authenticationOption określa, czy przeszukiwane są tylko profile anonimowe, tylko profile uwierzytelnione, czy wszystkie profile.

Wyniki zwracane przez GetAllInactiveProfiles element są ograniczone przez pageIndex parametry i pageSize . Parametr pageSize identyfikuje maksymalną liczbę ProfileInfo obiektów, które mają być zwracane w obiekcie ProfileInfoCollection. Parametr pageIndex określa, która strona wyników ma być zwracana, gdzie zero identyfikuje pierwszą stronę. Parametr totalRecords jest parametrem ustawionym out na całkowitą liczbę nieaktywnych profilów użytkowników dla skonfigurowanego applicationNameparametru authenticationOption , na podstawie parametrów i userInactiveSinceDate . Jeśli na przykład skonfigurowano applicationName13 użytkowników, a pageIndex wartość to 1 z wartością pageSize 5, ProfileInfoCollection zwrócona wartość będzie zawierać szósty do dziesięciu nieaktywnych profilów zwróconych. Parametr totalRecords zostanie ustawiony na wartość 13.

Dotyczy

Zobacz też