SchemeSettingElementCollection 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public ref class SchemeSettingElementCollection sealed : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Configuration.SchemeSettingElement), AddItemName="add", ClearItemsName="clear", CollectionType=System.Configuration.ConfigurationElementCollectionType.AddRemoveClearMap, RemoveItemName="remove")]
public sealed class SchemeSettingElementCollection : System.Configuration.ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Configuration.SchemeSettingElementCollection), AddItemName="add", ClearItemsName="clear", CollectionType=System.Configuration.ConfigurationElementCollectionType.AddRemoveClearMap, RemoveItemName="remove")]
public sealed class SchemeSettingElementCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Configuration.SchemeSettingElement), AddItemName="add", ClearItemsName="clear", CollectionType=System.Configuration.ConfigurationElementCollectionType.AddRemoveClearMap, RemoveItemName="remove")>]
type SchemeSettingElementCollection = class
inherit ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Configuration.SchemeSettingElementCollection), AddItemName="add", ClearItemsName="clear", CollectionType=System.Configuration.ConfigurationElementCollectionType.AddRemoveClearMap, RemoveItemName="remove")>]
type SchemeSettingElementCollection = class
inherit ConfigurationElementCollection
Public NotInheritable Class SchemeSettingElementCollection
Inherits ConfigurationElementCollection
- 繼承
-
SchemeSettingElementCollection
- 屬性
-
該 SchemeSettingElementCollection 類別代表 <設定檔中 Uri 區段下的 schemeSettings> 元素。
SchemeSettingElementCollection組態檔案中的類別與 <schemeSettings> 區塊看起來是通用的,暗示應用程式可以為任何方案指定任何System.GenericUriParserOptions列舉值。 事實上,只有 GenericUriParserOptions.DontUnescapePathDotsAndSlashes HTTP 和 HTTPS 方案的旗標被支援。 其他設定都被忽略。
預設情況下,該 System.Uri 類別會在執行路徑壓縮前解脫百分比編碼路徑分隔符。 此機制被實作為防範以下攻擊的安全機制:
http://www.contoso.com/..%2F..%2F/Windows/System32/cmd.exe?/c+dir+c:\
如果這個 URI 傳給無法正確處理百分比編碼字元的模組,伺服器可能會執行以下指令:
c:\Windows\System32\cmd.exe /c dir c:\
因此, System.Uri 類別先解除路徑分隔符的脫義,然後再施行路徑壓縮。 將上述惡意 URL 傳給 System.Uri 類別建構器後,會得到以下 URI:
http://www.microsoft.com/Windows/System32/cmd.exe?/c+dir+c:\
此預設行為可修改為不使用 SchemeSettingElement 類別解脫編碼路徑分隔符。
建構函式
屬性
方法
| 名稱 |
Description |
|
BaseAdd(ConfigurationElement, Boolean)
|
將組態專案加入至組態專案集合。
(繼承來源 ConfigurationElementCollection)
|
|
BaseAdd(ConfigurationElement)
|
將群組態專案加入至 ConfigurationElementCollection。
(繼承來源 ConfigurationElementCollection)
|
|
BaseAdd(Int32, ConfigurationElement)
|
將組態專案加入至組態專案集合。
(繼承來源 ConfigurationElementCollection)
|
|
BaseClear()
|
從集合中移除所有組態項目物件。
(繼承來源 ConfigurationElementCollection)
|
|
BaseGet(Int32)
|
取得位於指定索引位置的組態專案。
(繼承來源 ConfigurationElementCollection)
|
|
BaseGet(Object)
|
傳回具有指定索引鍵的組態專案。
(繼承來源 ConfigurationElementCollection)
|
|
BaseGetAllKeys()
|
針對包含在 ConfigurationElementCollection中的所有組態項目,傳回索引鍵的陣列。
(繼承來源 ConfigurationElementCollection)
|
|
BaseGetKey(Int32)
|
取得位於指定索引位置之 ConfigurationElement 的索引鍵。
(繼承來源 ConfigurationElementCollection)
|
|
BaseIndexOf(ConfigurationElement)
|
表示指定之 ConfigurationElement的索引。
(繼承來源 ConfigurationElementCollection)
|
|
BaseIsRemoved(Object)
|
指出是否已從 ConfigurationElement中移除具有指定索引鍵的 ConfigurationElementCollection。
(繼承來源 ConfigurationElementCollection)
|
|
BaseRemove(Object)
|
從集合中移除 ConfigurationElement。
(繼承來源 ConfigurationElementCollection)
|
|
BaseRemoveAt(Int32)
|
拿掉位於指定索引位置的 ConfigurationElement。
(繼承來源 ConfigurationElementCollection)
|
|
CopyTo(ConfigurationElement[], Int32)
|
將 ConfigurationElementCollection 的內容複製到陣列。
(繼承來源 ConfigurationElementCollection)
|
|
CreateNewElement()
|
在衍生類別中覆寫時,建立新的 ConfigurationElement。
(繼承來源 ConfigurationElementCollection)
|
|
CreateNewElement(String)
|
在衍生類別中覆寫時,建立新的 ConfigurationElement。
(繼承來源 ConfigurationElementCollection)
|
|
DeserializeElement(XmlReader, Boolean)
|
從組態檔讀取 XML。
(繼承來源 ConfigurationElement)
|
|
Equals(Object)
|
比較 ConfigurationElementCollection 與指定的物件。
(繼承來源 ConfigurationElementCollection)
|
|
GetElementKey(ConfigurationElement)
|
在衍生類別中覆寫時,取得指定組態專案的專案索引鍵。
(繼承來源 ConfigurationElementCollection)
|
|
GetEnumerator()
|
得到IEnumerator一個 ,用於迭代 。ConfigurationElementCollection
(繼承來源 ConfigurationElementCollection)
|
|
GetHashCode()
|
取得代表 ConfigurationElementCollection 實例的唯一值。
(繼承來源 ConfigurationElementCollection)
|
|
GetTransformedAssemblyString(String)
|
傳回所指定元件名稱的轉換版本。
(繼承來源 ConfigurationElement)
|
|
GetTransformedTypeString(String)
|
傳回指定之型別名稱的轉換版本。
(繼承來源 ConfigurationElement)
|
|
GetType()
|
取得目前實例的 Type。
(繼承來源 Object)
|
|
IndexOf(SchemeSettingElement)
|
指定的 SchemeSettingElement索引。
|
|
Init()
|
將 ConfigurationElement 物件設定為其初始狀態。
(繼承來源 ConfigurationElement)
|
|
InitializeDefault()
|
用來初始化 ConfigurationElement 物件的預設值集。
(繼承來源 ConfigurationElement)
|
|
IsElementName(String)
|
指出指定的 ConfigurationElement 是否存在於 ConfigurationElementCollection中。
(繼承來源 ConfigurationElementCollection)
|
|
IsElementRemovable(ConfigurationElement)
|
指出是否可以從 ConfigurationElement中移除指定的 ConfigurationElementCollection。
(繼承來源 ConfigurationElementCollection)
|
|
IsModified()
|
指出此 ConfigurationElementCollection 自上次儲存或載入衍生類別時是否已修改。
(繼承來源 ConfigurationElementCollection)
|
|
IsReadOnly()
|
指出 ConfigurationElementCollection 物件是否為唯讀。
(繼承來源 ConfigurationElementCollection)
|
|
ListErrors(IList)
|
將這個 ConfigurationElement 物件和所有子元素中的無效屬性錯誤新增至傳遞的清單。
(繼承來源 ConfigurationElement)
|
|
MemberwiseClone()
|
建立目前 Object的淺層複本。
(繼承來源 Object)
|
|
OnDeserializeUnrecognizedAttribute(String, String)
|
取得值,指出還原串行化期間是否遇到未知的屬性。
(繼承來源 ConfigurationElement)
|
|
OnDeserializeUnrecognizedElement(String, XmlReader)
|
導致組態系統擲回例外狀況。
(繼承來源 ConfigurationElementCollection)
|
|
OnRequiredPropertyNotFound(String)
|
找不到必要屬性時擲回例外狀況。
(繼承來源 ConfigurationElement)
|
|
PostDeserialize()
|
在還原串行化之後呼叫。
(繼承來源 ConfigurationElement)
|
|
PreSerialize(XmlWriter)
|
在串行化之前呼叫。
(繼承來源 ConfigurationElement)
|
|
Reset(ConfigurationElement)
|
在衍生類別中覆寫時,將 ConfigurationElementCollection 重設為其未修改的狀態。
(繼承來源 ConfigurationElementCollection)
|
|
ResetModified()
|
在衍生類別中覆寫時,將 IsModified() 屬性的值重設為 false。
(繼承來源 ConfigurationElementCollection)
|
|
SerializeElement(XmlWriter, Boolean)
|
在衍生類別中覆寫時,將組態數據寫入組態檔中的 XML 專案。
(繼承來源 ConfigurationElementCollection)
|
|
SerializeToXmlElement(XmlWriter, String)
|
在衍生類別中實作時,將此組態專案的外部標記寫入組態檔。
(繼承來源 ConfigurationElement)
|
|
SetPropertyValue(ConfigurationProperty, Object, Boolean)
|
將屬性設定為指定的值。
(繼承來源 ConfigurationElement)
|
|
SetReadOnly()
|
設定 IsReadOnly() 物件和所有子元素的 ConfigurationElementCollection 屬性。
(繼承來源 ConfigurationElementCollection)
|
|
ToString()
|
傳回表示目前 物件的字串。
(繼承來源 Object)
|
|
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)
|
反轉從不同組態階層層級合併組態資訊的效果。
(繼承來源 ConfigurationElementCollection)
|
明確介面實作
擴充方法
另請參閱