System.Security.Policy.CodeGroup.CreateXml Method

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

Syntax

protected virtual void CreateXml (System.Security.SecurityElement element, PolicyLevel level)

Parameters

element
The XML encoding to which to add the serialization.
level
The policy level within which the code group exists.

Remarks

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

The XML created using this method is deserialized by the CodeGroup.ParseXml(System.Security.SecurityElement, PolicyLevel) method.

Requirements

Namespace: System.Security.Policy
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0