SectionInformation.ProtectionProvider Propriedade

Definição

Obtém o provedor de configuração protegido para a seção de configuração associada.

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

Valor da propriedade

O provedor de configuração protegido para esse ConfigurationSection objeto.

Exemplos

O exemplo a seguir mostra como obter o ProtectSection valor de um ConfigurationSection objeto .

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

Comentários

Para seções desprotegidas, a ProtectionProvider propriedade é null.

Para obter mais informações sobre seções de configuração protegida, consulte Criptografando informações de configuração usando a configuração protegida.

Aplica-se a

Confira também