SectionInformation.ProtectionProvider 属性   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取关联配置节的受保护的配置提供程序。
public:
 property System::Configuration::ProtectedConfigurationProvider ^ ProtectionProvider { System::Configuration::ProtectedConfigurationProvider ^ get(); };public System.Configuration.ProtectedConfigurationProvider ProtectionProvider { get; }member this.ProtectionProvider : System.Configuration.ProtectedConfigurationProviderPublic ReadOnly Property ProtectionProvider As ProtectedConfigurationProvider属性值
此 ConfigurationSection 对象受保护的配置提供程序。
示例
以下示例演示如何获取 ProtectSection 对象的值 ConfigurationSection 。
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
注解
对于未受保护的部分,属性 ProtectionProvider 为 null。
有关受保护的配置部分的详细信息,请参阅 使用受保护的配置加密配置信息。