Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


CodeGroup.CreateXml(SecurityElement, PolicyLevel) Method

Definition

When overridden in a derived class, serializes properties and internal state specific to a derived code group and adds the serialization to the specified SecurityElement.

C#
protected virtual void CreateXml (System.Security.SecurityElement element, System.Security.Policy.PolicyLevel level);

Parameters

element
SecurityElement

The XML encoding to which to add the serialization.

level
PolicyLevel

The policy level within which the code group exists.

Remarks

ToXml cannot be overridden. If you need to serialize members specific to a particular implementation of CodeGroup, you must override CreateXml and serialize your members there. When the code group is serialized, ToXml calls CreateXml and adds your serialization to the SecurityElement created by ToXml.

The XML created using this method is deserialized by the ParseXml method.

Notes to Inheritors

If you implement this method, you must implement the ParseXml(SecurityElement, PolicyLevel) method as well.

Applies to

Termék Verziók
.NET 8 (package-provided), 9 (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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also