Export (0) Print
Expand All

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 SecurityElement.

[Visual Basic]
Protected Overridable Sub CreateXml( _
   ByVal element As SecurityElement, _
   ByVal level As PolicyLevel _
)
[C#]
protected virtual void CreateXml(
 SecurityElement element,
 PolicyLevel level
);
[C++]
protected: virtual void CreateXml(
 SecurityElement* element,
 PolicyLevel* level
);
[JScript]
protected function CreateXml(
   element : SecurityElement,
 level : PolicyLevel
);

Parameters

element
The XML encoding to which to add the serialization.
level
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 method as well.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

CodeGroup Class | CodeGroup Members | System.Security.Policy Namespace | ParseXml

Show:
© 2014 Microsoft