ProfileProvider.DeleteInactiveProfiles Methode

Definition

Beim Überschreiben in einer abgeleiteten Klasse werden alle Benutzerprofildaten für Profile gelöscht, in denen das letzte Aktivitätsdatum vor dem angegebenen Datum aufgetreten ist.

public:
 abstract int DeleteInactiveProfiles(System::Web::Profile::ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate);
public abstract int DeleteInactiveProfiles(System.Web.Profile.ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate);
abstract member DeleteInactiveProfiles : System.Web.Profile.ProfileAuthenticationOption * DateTime -> int
Public MustOverride Function DeleteInactiveProfiles (authenticationOption As ProfileAuthenticationOption, userInactiveSinceDate As DateTime) As Integer

Parameter

authenticationOption
ProfileAuthenticationOption

Einer der ProfileAuthenticationOption Werte, der angibt, ob anonym, authentifiziert oder beide Arten von Profilen gelöscht werden.

userInactiveSinceDate
DateTime

Ein DateTime Objekt, das identifiziert, welche Benutzerprofile als inaktiv betrachtet werden. Wenn der LastActivityDate Wert eines Benutzerprofils an oder vor diesem Datum und dieser Uhrzeit auftritt, wird das Profil als inaktiv betrachtet.

Gibt zurück

Die Anzahl der Profile, die aus der Datenquelle gelöscht wurden.

Beispiele

Das folgende Codebeispiel zeigt die Methodensignatur für eine Implementierung der DeleteInactiveProfiles Methode. Ein Beispiel für eine vollständige ProfileProvider Implementierung finden Sie unter How to: Build and Run the Profile Provider Example.

public override int DeleteInactiveProfiles(
    ProfileAuthenticationOption authenticationOption,
    DateTime userInactiveSinceDate)
{
    return 0;
}
Public Overrides Function DeleteInactiveProfiles( _
ByVal authenticationOption As ProfileAuthenticationOption, _
ByVal userInactiveSinceDate As DateTime) As Integer

  Return 0
End Function

Hinweise

Die DeleteInactiveProfiles Methode wird verwendet, um nicht verwendete Profildaten aus der Datenquelle zu entfernen. Es werden nur Daten für die applicationName in der Konfigurationsdatei angegebene Daten entfernt. Der authenticationOption Parameter gibt an, ob nur anonyme Profile, nur authentifizierte Profile oder alle Profile durchsucht werden. Profile, in denen der LastActivityDate Parameterwert ausgeführt wird oder bevor der angegebene userInactiveSinceDate Parameterwert gelöscht wird.

Gilt für:

Weitere Informationen