System.Security.ISecurityPolicyEncodable.ToXml Method

Creates an XML encoding of the security object and its current state.

Syntax

public SecurityElement ToXml (System.Security.Policy.PolicyLevel level)

Parameters

level
The policy-level context to resolve named permission set references.

Returns

The root element of the XML representation of the policy object.

Remarks

The policy-level context is provided for resolution of named permission set references. For example, code groups use policy level to find named permission sets by name.

Custom code that extends security policy objects needs to implement the ISecurityPolicyEncodable.ToXml(System.Security.Policy.PolicyLevel) and ISecurityPolicyEncodable.FromXml(SecurityElement, System.Security.Policy.PolicyLevel) methods to make the objects security-encodable.

Requirements

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