ProfileProvider.GetAllProfiles(ProfileAuthenticationOption, Int32, Int32, Int32) ProfileProvider.GetAllProfiles(ProfileAuthenticationOption, Int32, Int32, Int32) ProfileProvider.GetAllProfiles(ProfileAuthenticationOption, Int32, Int32, Int32) ProfileProvider.GetAllProfiles(ProfileAuthenticationOption, Int32, Int32, Int32) Method

定义

在派生类中重写后,此方法检索数据源中所有配置文件的用户配置文件数据。When overridden in a derived class, retrieves user profile data for all profiles in the data source.

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 ProfileAuthenticationOption ProfileAuthenticationOption

ProfileAuthenticationOption 值之一,指定是返回匿名配置文件、经过身份验证的配置文件还是同时返回这两种类型的配置文件。One of the ProfileAuthenticationOption values, specifying whether anonymous, authenticated, or both types of profiles are returned.

pageIndex
Int32 Int32 Int32 Int32

要返回的结果页的索引。The index of the page of results to return.

pageSize
Int32 Int32 Int32 Int32

要返回的结果页的大小。The size of the page of results to return.

totalRecords
Int32 Int32 Int32 Int32

当此方法返回时,此参数包含配置文件的总数。When this method returns, contains the total number of profiles.

返回

包含数据源中所有配置文件的用户配置文件信息的 ProfileInfoCollectionA ProfileInfoCollection containing user-profile information for all profiles in the data source.

示例

下面的代码示例演示GetAllProfiles方法的实现的方法签名。The following code example shows the method signature for an implementation of the GetAllProfiles method. 有关完整ProfileProvider实现的示例,请参阅如何:生成并运行配置文件提供程序示例。For an example of a full ProfileProvider implementation, see How to: Build and Run the Profile Provider Example.

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方法用于检索所有配置文件的配置文件信息。The GetAllProfiles method is used to retrieve profile information for all profiles. 仅返回配置文件applicationName中指定的数据。Only data for the applicationName specified in the configuration file is returned. authenticationOption参数指定是否仅搜索匿名配置文件、是否仅搜索已通过身份验证的配置文件或所有配置文件。The authenticationOption parameter specifies whether only anonymous profiles, only authenticated profiles, or all profiles are searched.

返回GetAllInactiveProfiles的结果是pageIndex由和pageSize参数约束的。The results returned by GetAllInactiveProfiles are constrained by the pageIndex and pageSize parameters. 参数标识要在中返回的ProfileInfo ProfileInfoCollection对象的最大数目。 pageSizeThe pageSize parameter identifies the maximum number of ProfileInfo objects to return in the ProfileInfoCollection. pageIndex参数标识要返回的结果页,其中零标识第一页。The pageIndex parameter identifies which page of results to return, where zero identifies the first page. out applicationName authenticationOption参数是一个参数,该参数设置为基于和userInactiveSinceDate参数配置的非活动用户配置文件的总数。 totalRecordsThe totalRecords parameter is an out parameter that is set to the total number of inactive user profiles for the configured applicationName, based on the authenticationOption and userInactiveSinceDate parameters. applicationName例如,如果配置的有13个用户, pageIndex并且pageSize值为1且为5,则ProfileInfoCollection返回的将包含返回的第六个非活动配置文件。For example, if there are 13 users for the configured applicationName, and the pageIndex value is 1 with a pageSize of 5, the ProfileInfoCollection returned would contain the sixth through the tenth inactive profiles returned. totalRecords参数将设置为13。The totalRecords parameter would be set to 13.

适用于

另请参阅