Επεξεργασία

Κοινή χρήση μέσω


ProfileProvider.DeleteProfiles Method

Definition

Deletes profile properties and information from the data source.

Overloads

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

Parameters

usernames
String[]

A string array of user names for profiles to be deleted.

Returns

The number of profiles deleted from the data source.

Examples

The following code example shows the method signature for an implementation of the DeleteProfiles method. 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

Remarks

The DeleteProfiles method deletes the profiles specified in the usernames parameter. Only data for the applicationName specified in the configuration file is removed.

See also

Applies to

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

Parameters

profiles
ProfileInfoCollection

A ProfileInfoCollection of information about profiles that are to be deleted.

Returns

The number of profiles deleted from the data source.

Examples

The following code example shows the method signature for an implementation of the DeleteProfiles method. 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

Remarks

The DeleteProfiles method deletes the profiles specified in the profiles parameter. Only data for the applicationName specified in the configuration file is removed.

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.

See also

Applies to