ProfileProvider.DeleteProfiles 方法
定义
从数据源中删除配置文件属性和信息。Deletes profile properties and information from the data source.
重载
| DeleteProfiles(String[]) |
在派生类中重写后,此方法删除与提供的用户名列表相匹配的配置文件的配置文件属性和信息。When overridden in a derived class, deletes profile properties and information for profiles that match the supplied list of user names. |
| DeleteProfiles(ProfileInfoCollection) |
在派生类中重写后,此方法删除所提供的一组配置文件的配置文件属性和信息。When overridden in a derived class, deletes profile properties and information for the supplied list of profiles. |
DeleteProfiles(String[])
在派生类中重写后,此方法删除与提供的用户名列表相匹配的配置文件的配置文件属性和信息。When overridden in a derived class, deletes profile properties and information for profiles that match the supplied list of user names.
public:
abstract int DeleteProfiles(cli::array <System::String ^> ^ usernames);
public abstract int DeleteProfiles (string[] usernames);
abstract member DeleteProfiles : string[] -> int
Public MustOverride Function DeleteProfiles (usernames As String()) As Integer
参数
- usernames
- String[]
要删除的配置文件的用户名字符串数组。A string array of user names for profiles to be deleted.
返回
从数据源中删除的配置文件的数目。The number of profiles deleted from the data source.
示例
下面的代码示例演示方法的实现的方法签名 DeleteProfiles 。The following code example shows the method signature for an implementation of the DeleteProfiles method. 有关完整实现的示例 ProfileProvider ,请参阅 如何:生成和运行配置文件提供程序示例。For an example of a full ProfileProvider implementation, see How to: Build and Run the Profile Provider Example.
public override int DeleteProfiles(string[] usernames)
{
return 0;
}
Public Overrides Function DeleteProfiles(ByVal usernames As String()) As Integer
Return 0
End Function
注解
DeleteProfiles方法删除参数中指定的配置文件 usernames 。The DeleteProfiles method deletes the profiles specified in the usernames parameter. 仅 applicationName 删除配置文件中指定的数据。Only data for the applicationName specified in the configuration file is removed.
适用于
DeleteProfiles(ProfileInfoCollection)
在派生类中重写后,此方法删除所提供的一组配置文件的配置文件属性和信息。When overridden in a derived class, deletes profile properties and information for the supplied list of profiles.
public:
abstract int DeleteProfiles(System::Web::Profile::ProfileInfoCollection ^ profiles);
public abstract int DeleteProfiles (System.Web.Profile.ProfileInfoCollection profiles);
abstract member DeleteProfiles : System.Web.Profile.ProfileInfoCollection -> int
Public MustOverride Function DeleteProfiles (profiles As ProfileInfoCollection) As Integer
参数
- profiles
- ProfileInfoCollection
一个 ProfileInfoCollection,包含有关要删除的配置文件的信息。A ProfileInfoCollection of information about profiles that are to be deleted.
返回
从数据源中删除的配置文件的数目。The number of profiles deleted from the data source.
示例
下面的代码示例演示方法的实现的方法签名 DeleteProfiles 。The following code example shows the method signature for an implementation of the DeleteProfiles method. 有关完整实现的示例 ProfileProvider ,请参阅 如何:生成和运行配置文件提供程序示例。For an example of a full ProfileProvider implementation, see How to: Build and Run the Profile Provider Example.
public override int DeleteProfiles(ProfileInfoCollection profiles)
{
return 0;
}
Public Overrides Function DeleteProfiles(ByVal profiles As ProfileInfoCollection) As Integer
Return 0
End Function
注解
DeleteProfiles方法删除参数中指定的配置文件 profiles 。The DeleteProfiles method deletes the profiles specified in the profiles parameter. 仅 applicationName 删除配置文件中指定的数据。Only data for the applicationName specified in the configuration file is removed.
在派生类中实现此方法时,可以使用 applicationName UserName 提供的中的每个对象的值和属性 ProfileInfo ProfileInfoCollection 来确定要从数据源中删除的配置文件。When implementing this method in a derived class, you can use the applicationName value and the UserName property of each ProfileInfo object in the supplied ProfileInfoCollection to determine which profiles to delete from your data source.