MembershipProvider.GetAllUsers(Int32, Int32, Int32) Método

Definição

Obtém uma coleção de todos os usuários na fonte de dados nas páginas de dados.Gets a collection of all the users in the data source in pages of data.

public:
 abstract System::Web::Security::MembershipUserCollection ^ GetAllUsers(int pageIndex, int pageSize, [Runtime::InteropServices::Out] int % totalRecords);
public abstract System.Web.Security.MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords);
abstract member GetAllUsers : int * int * int -> System.Web.Security.MembershipUserCollection
Public MustOverride Function GetAllUsers (pageIndex As Integer, pageSize As Integer, ByRef totalRecords As Integer) As MembershipUserCollection

Parâmetros

pageIndex
Int32

O índice da página de resultados a serem retornados.The index of the page of results to return. pageIndex é baseado em zero.pageIndex is zero-based.

pageSize
Int32

O tamanho da página de resultados a ser retornada.The size of the page of results to return.

totalRecords
Int32

O número total de usuários correspondentes.The total number of matched users.

Retornos

MembershipUserCollection

Uma coleção MembershipUserCollection que contém uma página de objetos pageSizeMembershipUser começando na página especificada por pageIndex.A MembershipUserCollection collection that contains a page of pageSizeMembershipUser objects beginning at the page specified by pageIndex.

Exemplos

Para obter um exemplo de uma MembershipProvider implementação, consulte implementando um provedor de perfil.For an example of a MembershipProvider implementation, see Implementing a Profile Provider.

Comentários

GetAllUsers Retorna uma lista de todos os usuários da fonte de dados para a propriedade configurada ApplicationName .GetAllUsers returns a list of all of the users from the data source for the configured ApplicationName property. Os usuários são retornados em ordem alfabética por nome de usuário.Users are returned in alphabetical order by user name.

Os resultados retornados por GetAllUsers são restritos pelos pageIndex pageSize parâmetros e.The results returned by GetAllUsers are constrained by the pageIndex and pageSize parameters. O pageSize parâmetro identifica o número de MembershipUser objetos a serem retornados na MembershipUserCollection coleção.The pageSize parameter identifies the number of MembershipUser objects to return in the MembershipUserCollection collection. O pageIndex parâmetro identifica qual página de resultados retornar, em que 0 identifica a primeira página.The pageIndex parameter identifies which page of results to return, where 0 identifies the first page. O totalRecords parâmetro é um out parâmetro que é definido como o número total de usuários de associação no banco de dados.The totalRecords parameter is an out parameter that is set to the total number of membership users in the database. Por exemplo, se houver 13 usuários no banco de dados e o pageIndex valor for 1 com um pageSize de 5, o MembershipUserCollection conterá o sexto até o décimo dos usuários retornados.For example, if there are 13 users in the database, and the pageIndex value was 1 with a pageSize of 5, then the MembershipUserCollection would contain the sixth through the tenth users returned. totalRecords seria definido como 13.totalRecords would be set to 13.

Aplica-se a