ProtectedConfiguration.Providers Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a collection of the installed protected-configuration providers.
public:
static property System::Configuration::ProtectedConfigurationProviderCollection ^ Providers { System::Configuration::ProtectedConfigurationProviderCollection ^ get(); };
public static System.Configuration.ProtectedConfigurationProviderCollection Providers { get; }
static member Providers : System.Configuration.ProtectedConfigurationProviderCollection
Public Shared ReadOnly Property Providers As ProtectedConfigurationProviderCollection
Property Value
A ProtectedConfigurationProviderCollection collection of installed ProtectedConfigurationProvider objects.
Examples
The following example shows how to use the Providers property to retrieve the collection of installed ProtectedConfigurationProvider objects.
[PermissionSet(SecurityAction.Demand, Name="FullTrust")]
private static void GetProviders()
{
// Get the providers' collection.
ProtectedConfigurationProviderCollection
providers = ProtectedConfiguration.Providers;
IEnumerator pEnum =
providers.GetEnumerator();
foreach (ProtectedConfigurationProvider provider in
providers)
{
Console.WriteLine
("Provider name: {0}",
provider.Name);
Console.WriteLine
("Provider description: {0}",
provider.Description);
}
}
<PermissionSet( _
SecurityAction.Demand, Name:="FullTrust")> _
Private Shared Sub GetProviders()
' Get the providers' collection.
Dim providers _
As ProtectedConfigurationProviderCollection = _
ProtectedConfiguration.Providers
Dim pEnum As IEnumerator = _
providers.GetEnumerator()
Dim provider _
As ProtectedConfigurationProvider
For Each provider In providers
Console.WriteLine( _
"Provider name: {0}", provider.Name)
Console.WriteLine( _
"Provider description: {0}", provider.Description)
Next provider
End Sub
Applies to
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.