ProfileProvider.GetNumberOfInactiveProfiles Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Po przesłonięciu w klasie pochodnej zwraca liczbę profilów, w których wystąpiła data ostatniego działania w określonym dniu lub przed określoną datą.
public:
abstract int GetNumberOfInactiveProfiles(System::Web::Profile::ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate);
public abstract int GetNumberOfInactiveProfiles (System.Web.Profile.ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate);
abstract member GetNumberOfInactiveProfiles : System.Web.Profile.ProfileAuthenticationOption * DateTime -> int
Public MustOverride Function GetNumberOfInactiveProfiles (authenticationOption As ProfileAuthenticationOption, userInactiveSinceDate As DateTime) As Integer
Parametry
- authenticationOption
- ProfileAuthenticationOption
ProfileAuthenticationOption Jedną z wartości, określając, czy są zwracane anonimowe, uwierzytelnione, czy oba typy profilów.
- userInactiveSinceDate
- DateTime
Element DateTime określający, które profile użytkowników są uznawane za nieaktywne. LastActivityDate Jeśli profil użytkownika występuje w dniu lub przed tą datą i godziną, profil jest uznawany za nieaktywny.
Zwraca
Liczba profilów, w których miała miejsce data ostatniego działania w określonym dniu lub przed określoną datą.
Przykłady
Poniższy przykład kodu przedstawia sygnaturę metody dla implementacji GetNumberOfInactiveProfiles metody . Przykład pełnej ProfileProvider implementacji można znaleźć w temacie How to: Build and Run the Profile Provider Example (Instrukcje: kompilowanie i uruchamianie dostawcy profilu).
public override int GetNumberOfInactiveProfiles(
ProfileAuthenticationOption authenticationOption,
DateTime userInactiveSinceDate)
{
return 0;
}
Public Overrides Function GetNumberOfInactiveProfiles( _
ByVal authenticationOption As ProfileAuthenticationOption, _
ByVal userInactiveSinceDate As DateTime) As Integer
Return 0
End Function
Uwagi
Metoda GetNumberOfInactiveProfiles służy do pobierania liczby wszystkich nieużywanych profilów użytkowników. Zwracane są tylko dane określone applicationName
w pliku konfiguracji. Parametr authenticationOption
określa, czy są przeszukiwane tylko profile anonimowe, tylko profile uwierzytelnione, czy wszystkie profile. Spośród przeszukanych profilów każdy profil, LastActivityDate który występuje na lub przed zliczaniu określonej userInactiveSinceDate
wartości parametru.