ProtectedConfigurationProviderCollection 類別

定義

提供 ProtectedConfigurationProvider 物件的集合。

public ref class ProtectedConfigurationProviderCollection : System::Configuration::Provider::ProviderCollection
public class ProtectedConfigurationProviderCollection : System.Configuration.Provider.ProviderCollection
type ProtectedConfigurationProviderCollection = class
    inherit ProviderCollection
Public Class ProtectedConfigurationProviderCollection
Inherits ProviderCollection
繼承
ProtectedConfigurationProviderCollection

備註

類別 ProvidersProtectedConfiguration 屬性是 ProtectedConfigurationProviderCollection 應用程式可用的所有受保護組態提供者集合。

您可以加密組態檔的區段,以保護應用程式所使用的敏感性資訊。 即使攻擊者取得組態檔的存取權,這可藉由讓未經授權的存取變得困難,進而改善安全性。

.NET Framework 包含兩個受保護的組態提供者,可用來加密組態檔的區段:類別RsaProtectedConfigurationProvider、使用 RSACryptoServiceProvider 類別來加密組態區段,以及DpapiProtectedConfigurationProvider使用 Windows 數據保護 API (DPAPI) 加密組態區段的 類別。

您可能需要使用 RSA 或 DPAPI 提供者以外的演算法來加密敏感性資訊。 在此情況下,您可以建置自己的自定義受保護組態提供者。 類別 ProtectedConfigurationProvider 是抽象基類,您必須繼承自 ,才能建立自己的受保護組態提供者。

如需受保護組態的詳細資訊,請參閱 使用受保護的組態加密組態資訊

建構函式

ProtectedConfigurationProviderCollection()

使用預設值初始化 ProtectedConfigurationProviderCollection 類別的新執行個體。

屬性

Count

取得集合中的提供者數目。

(繼承來源 ProviderCollection)
IsSynchronized

取得值,表示是否同步化存取集合 (執行緒安全)。

(繼承來源 ProviderCollection)
Item[String]

取得集合中具有指定之名稱的 ProtectedConfigurationProvider 物件。

SyncRoot

取得目前的物件。

(繼承來源 ProviderCollection)

方法

Add(ProviderBase)

ProtectedConfigurationProvider 物件加入至集合。

Clear()

移除集合的所有項目。

(繼承來源 ProviderCollection)
CopyTo(ProviderBase[], Int32)

從指定之索引處開始,將集合的內容複製到指定的陣列。

(繼承來源 ProviderCollection)
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetEnumerator()

傳回實作 IEnumerator 介面以逐一查看集合的物件。

(繼承來源 ProviderCollection)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
Remove(String)

從集合移除提供者。

(繼承來源 ProviderCollection)
SetReadOnly()

將集合設定為唯讀。

(繼承來源 ProviderCollection)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

明確介面實作

ICollection.CopyTo(Array, Int32)

從特定的陣列索引開始,將 ProviderCollection 的項目複製到陣列中。

(繼承來源 ProviderCollection)

擴充方法

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。

AsParallel(IEnumerable)

啟用查詢的平行化作業。

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryable

適用於

另請參閱