Bagikan melalui


RoleManagerSection.Providers Properti

Definisi

ProviderSettingsCollection Mendapatkan objek ProviderSettings elemen.

public:
 property System::Configuration::ProviderSettingsCollection ^ Providers { System::Configuration::ProviderSettingsCollection ^ get(); };
[System.Configuration.ConfigurationProperty("providers")]
public System.Configuration.ProviderSettingsCollection Providers { get; }
[<System.Configuration.ConfigurationProperty("providers")>]
member this.Providers : System.Configuration.ProviderSettingsCollection
Public ReadOnly Property Providers As ProviderSettingsCollection

Nilai Properti

ProviderSettingsCollection yang berisi pengaturan penyedia yang ditentukan dalam providers subbagian roleManager bagian file konfigurasi.

Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan Providers properti . Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk RoleManagerSection kelas .

// Display elements of the Providers collection property.
foreach (ProviderSettings providerItem in configSection.Providers)
{
  Console.WriteLine();
  Console.WriteLine("Provider Details:");
  Console.WriteLine("Name: {0}", providerItem.Name);
  Console.WriteLine("Type: {0}", providerItem.Type);
}
' Display elements of the Providers collection property.
For Each providerItem As ProviderSettings In configSection.Providers()
  Console.WriteLine()
  Console.WriteLine("Provider Details:")
  Console.WriteLine("Name: {0}", providerItem.Name)
  Console.WriteLine("Type: {0}", providerItem.Type)
Next

Keterangan

Penyedia manajemen peran adalah komponen yang menyediakan akses ke jenis peran untuk situs. Anda dapat menentukan penyedia manajemen peran di providers subbagian roleManager bagian file konfigurasi.

Properti DefaultProvider menentukan penyedia yang digunakan secara default.

Berlaku untuk