SectionInformation.ProtectionProvider Eigenschap

Definitie

Hiermee haalt u de beveiligde configuratieprovider op voor de bijbehorende configuratiesectie.

public:
 property System::Configuration::ProtectedConfigurationProvider ^ ProtectionProvider { System::Configuration::ProtectedConfigurationProvider ^ get(); };
public System.Configuration.ProtectedConfigurationProvider ProtectionProvider { get; }
member this.ProtectionProvider : System.Configuration.ProtectedConfigurationProvider
Public ReadOnly Property ProtectionProvider As ProtectedConfigurationProvider

Waarde van eigenschap

De beveiligde configuratieprovider voor dit ConfigurationSection object.

Voorbeelden

In het volgende voorbeeld ziet u hoe u de ProtectSection waarde van een ConfigurationSection object kunt ophalen.

static public void GetProtectionProvider()
{
    SectionInformation sInfo =
        GetSectionInformation();

    ProtectedConfigurationProvider pp = 
        sInfo.ProtectionProvider;
    if (pp == null)
        Console.WriteLine("Protection provider is null");
    else
        Console.WriteLine("Protection provider: {0}", 
            pp.ToString());
}
Public Shared Sub GetProtectionProvider()

    Dim sInfo As SectionInformation = _
    GetSectionInformation()

    Dim pp _
    As ProtectedConfigurationProvider = _
    sInfo.ProtectionProvider
    If pp Is Nothing Then
        Console.WriteLine("Protection provider is null")
    Else
        Console.WriteLine("Protection provider: {0}", _
        pp.ToString())
    End If

End Sub

Opmerkingen

Voor niet-beveiligde secties is nullde ProtectionProvider eigenschap .

Zie Configuratiegegevens versleutelen met behulp van beveiligde configuratie voor meer informatie over beveiligde configuratiesecties.

Van toepassing op

Zie ook