PolicyStatement.ToXml 方法
定义
创建安全对象及其当前状态的 XML 编码。Creates an XML encoding of the security object and its current state.
重载
| ToXml() |
创建安全对象及其当前状态的 XML 编码。Creates an XML encoding of the security object and its current state. |
| ToXml(PolicyLevel) |
创建安全对象及其当前状态的 XML 编码。Creates an XML encoding of the security object and its current state. |
ToXml()
创建安全对象及其当前状态的 XML 编码。Creates an XML encoding of the security object and its current state.
public:
virtual System::Security::SecurityElement ^ ToXml();
public System.Security.SecurityElement ToXml ();
abstract member ToXml : unit -> System.Security.SecurityElement
override this.ToXml : unit -> System.Security.SecurityElement
Public Function ToXml () As SecurityElement
返回
安全对象的 XML 编码,包括任何状态信息。An XML encoding of the security object, including any state information.
实现
示例
下面的代码示例演示如何使用 ToXml 方法创建安全对象的 XML 编码。The following code example shows how to use the ToXml method to create an XML encoding of the security object. 此代码示例是为类提供的更大示例的一部分 PolicyStatement 。This code example is part of a larger example provided for the PolicyStatement class.
SecurityElement^ xmlElement = ( *policyStatement)->ToXml();
SecurityElement xmlElement = policyStatement.ToXml();
Dim xmlElement As SecurityElement = policyStatement.ToXml()
适用于
ToXml(PolicyLevel)
创建安全对象及其当前状态的 XML 编码。Creates an XML encoding of the security object and its current state.
public:
virtual System::Security::SecurityElement ^ ToXml(System::Security::Policy::PolicyLevel ^ level);
public System.Security.SecurityElement ToXml (System.Security.Policy.PolicyLevel level);
abstract member ToXml : System.Security.Policy.PolicyLevel -> System.Security.SecurityElement
override this.ToXml : System.Security.Policy.PolicyLevel -> System.Security.SecurityElement
Public Function ToXml (level As PolicyLevel) As SecurityElement
参数
- level
- PolicyLevel
用于查找 PolicyLevel 值的 NamedPermissionSet 上下文。The PolicyLevel context for lookup of NamedPermissionSet values.
返回
安全对象的 XML 编码,包括任何状态信息。An XML encoding of the security object, including any state information.