NetworkInformationPermission.FromXml(SecurityElement) 方法

定义

使用指定的 XML 编码设置此权限的状态。Sets the state of this permission using the specified XML encoding.

public:
 override void FromXml(System::Security::SecurityElement ^ securityElement);
public override void FromXml (System.Security.SecurityElement securityElement);
override this.FromXml : System.Security.SecurityElement -> unit
Public Overrides Sub FromXml (securityElement As SecurityElement)

参数

securityElement
SecurityElement

SecurityElement,包含用于设置当前权限状态的 XML 编码。A SecurityElement that contains the XML encoding to use to set the state of the current permission

例外

securityElementnullsecurityElement is null.

securityElement 不是权限编码。securityElement is not a permission encoding.

- 或 --or- securityElement 不是 NetworkInformationPermission 的编码。securityElement is not an encoding of a NetworkInformationPermission.

- 或 --or- securityElement 有无效的 NetworkInformationAccess 值。securityElement has invalid NetworkInformationAccess values.

注解

此方法由安全系统使用,通常不会由应用程序代码调用。This method is used by the security system and is not normally called by application code.

适用于