SectionInformation.ProtectionProvider Propiedad

Definición

Obtiene el proveedor de configuración protegida para la sección de configuración asociada.

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 de propiedad

Proveedor de configuración protegida para este objeto ConfigurationSection.

Ejemplos

En el ejemplo siguiente se muestra cómo obtener el ProtectSection valor de un 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

Comentarios

Para secciones desprotegidas, la ProtectionProvider propiedad es null.

Para obtener más información sobre las secciones de configuración protegida, vea Cifrar la información de configuración mediante la configuración protegida.

Se aplica a

Consulte también