ProfileProvider.GetAllProfiles Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Türetilmiş bir sınıfta geçersiz kılındığında, veri kaynağındaki tüm profiller için kullanıcı profili verilerini alır.
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
Parametreler
- authenticationOption
- ProfileAuthenticationOption
ProfileAuthenticationOption Anonim, kimliği doğrulanmış veya her iki profil türünün de döndürüleceğini belirten değerlerden biri.
- pageIndex
- Int32
Döndürülecek sonuç sayfasının dizini.
- pageSize
- Int32
Döndürülecek sonuç sayfasının boyutu.
- totalRecords
- Int32
Bu yöntem döndürdüğünde, toplam profil sayısını içerir.
Döndürülenler
ProfileInfoCollection Veri kaynağındaki tüm profiller için kullanıcı profili bilgilerini içeren bir.
Örnekler
Aşağıdaki kod örneği, yönteminin uygulanması için yöntem imzasını GetAllProfiles gösterir. Tam ProfileProvider uygulama örneği için bkz . Nasıl yapılır: Profil Sağlayıcısı Örneği Oluşturma ve Çalıştırma.
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
Açıklamalar
GetAllProfiles yöntemi, tüm profiller için profil bilgilerini almak için kullanılır. Yalnızca yapılandırma dosyasında belirtilen veriler applicationName
döndürülür.
authenticationOption
parametresi yalnızca anonim profillerin mi, yalnızca kimliği doğrulanmış profillerin mi yoksa tüm profillerin mi arandığını belirtir.
tarafından GetAllInactiveProfiles döndürülen sonuçlar ve pageSize
parametreleriyle pageIndex
kısıtlanır. parametresi, pageSize
içinde ProfileInfoCollectiondöndürülecek en fazla nesne sayısını ProfileInfo tanımlar.
pageIndex
parametresi, döndürülecek sonuç sayfasını ve sıfırın ilk sayfayı tanımladığı sayfayı tanımlar.
totalRecords
parametresi, ve userInactiveSinceDate
parametrelerine göre authenticationOption
yapılandırılan applicationName
için etkin olmayan kullanıcı profillerinin toplam sayısına ayarlanmış bir out
parametredir. Örneğin, yapılandırılmış applicationName
için 13 kullanıcı varsa ve pageIndex
değer 5 ile 1 pageSize
ise, ProfileInfoCollection döndürülen altıncı ile onuncu etkin olmayan profiller döndürülür.
totalRecords
parametresi 13 olarak ayarlanır.