ProfileProvider.GetAllProfiles Metoda

Definice

Při přepsání v odvozené třídě načte data profilu uživatele pro všechny profily ve zdroji dat.

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

Jedna z ProfileAuthenticationOption hodnot určující, jestli jsou vráceny anonymní, ověřené nebo oba typy profilů.

pageIndex
Int32

Index stránky výsledků, které se mají vrátit.

pageSize
Int32

Velikost stránky výsledků, která se má vrátit.

totalRecords
Int32

Když tato metoda vrátí, obsahuje celkový počet profilů.

Návraty

ProfileInfoCollection

Obsahuje ProfileInfoCollection informace o profilu uživatele pro všechny profily ve zdroji dat.

Příklady

Následující příklad kódu ukazuje podpis metody pro implementaci GetAllProfiles metody. Příklad úplné ProfileProvider implementace najdete v tématu Postupy: Sestavení a spuštění příkladu zprostředkovatele 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

Poznámky

Metoda GetAllProfiles slouží k načtení informací o profilu pro všechny profily. Vrátí se pouze data zadaná applicationName v konfiguračním souboru. Parametr authenticationOption určuje, jestli se prohledávají jenom anonymní profily, jenom ověřené profily nebo všechny profily.

Výsledky, které GetAllInactiveProfiles vrací, jsou omezené parametry pageIndex a pageSize parametry. Parametr pageSize identifikuje maximální počet ProfileInfo objektů, které se mají vrátit do ProfileInfoCollectionsouboru . Parametr pageIndex identifikuje, která stránka výsledků se má vrátit, kde nula identifikuje první stránku. Parametr totalRecords je out parametr nastavený na celkový počet neaktivních profilů uživatelů nakonfigurovaných applicationNamena authenticationOption základě parametrů a userInactiveSinceDate parametrů. Pokud je například nakonfigurovaných applicationName13 uživatelů a pageIndex hodnota je 1 s pageSize hodnotou 5, ProfileInfoCollection bude vrácená hodnota obsahovat šestý až desátý vrácený neaktivní profily. Parametr totalRecords by byl nastaven na hodnotu 13.

Platí pro

Viz také