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í, zda jsou vráceny anonymní, ověřené nebo oba typy profilů.

pageIndex
Int32

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

pageSize
Int32

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

totalRecords
Int32

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

Návraty

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 naleznete 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 se používá k načtení informací o profilu pro všechny profily. Vrátí se pouze data zadaná v konfiguračním applicationName souboru. Parametr authenticationOption určuje, jestli se prohledávají pouze anonymní profily, pouze ověřené profily nebo všechny profily.

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

Platí pro

Viz také