CodeGroup.ParseXml(SecurityElement, PolicyLevel) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在衍生類別中覆寫時,從指定的 SecurityElement 重建衍生程式碼群組特定的屬性和內部狀態。
protected:
virtual void ParseXml(System::Security::SecurityElement ^ e, System::Security::Policy::PolicyLevel ^ level);
C#
protected virtual void ParseXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level);
abstract member ParseXml : System.Security.SecurityElement * System.Security.Policy.PolicyLevel -> unit
override this.ParseXml : System.Security.SecurityElement * System.Security.Policy.PolicyLevel -> unit
Protected Overridable Sub ParseXml (e As SecurityElement, level As PolicyLevel)
用來重新建構安全性物件的 XML 編碼方式。
- level
- PolicyLevel
程式碼群組所存在的原則層級。
FromXml 無法覆寫。 如果您需要還原串行化特定 實作 CodeGroup的特定成員,您必須覆寫 ParseXml 並還原串行化該處的成員。 還原串行化程式代碼群組時,FromXml從SecurityElement呼叫ParseXml並重新建構您的成員。
這個方法會還原串行化使用 建立的 CreateXmlXML。
如果您實作這個方法,也必須實作 CreateXml(SecurityElement, PolicyLevel) 方法。
產品 | 版本 |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |