SecurityManager.LoadPolicyLevelFromString(String, PolicyLevelType) 方法
定义
注意
此 API 现已过时。
注意
This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
从指定的字符串加载 PolicyLevel。Loads a PolicyLevel from the specified string.
public:
static System::Security::Policy::PolicyLevel ^ LoadPolicyLevelFromString(System::String ^ str, System::Security::PolicyLevelType type);
[System.Obsolete]
public static System.Security.Policy.PolicyLevel LoadPolicyLevelFromString (string str, System.Security.PolicyLevelType type);
public static System.Security.Policy.PolicyLevel LoadPolicyLevelFromString (string str, System.Security.PolicyLevelType type);
[System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public static System.Security.Policy.PolicyLevel LoadPolicyLevelFromString (string str, System.Security.PolicyLevelType type);
[<System.Obsolete>]
static member LoadPolicyLevelFromString : string * System.Security.PolicyLevelType -> System.Security.Policy.PolicyLevel
static member LoadPolicyLevelFromString : string * System.Security.PolicyLevelType -> System.Security.Policy.PolicyLevel
[<System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
static member LoadPolicyLevelFromString : string * System.Security.PolicyLevelType -> System.Security.Policy.PolicyLevel
Public Shared Function LoadPolicyLevelFromString (str As String, type As PolicyLevelType) As PolicyLevel
参数
- str
- String
安全策略级别的 XML 表示形式,与它在配置文件出现的形式相同。The XML representation of a security policy level in the same form in which it appears in a configuration file.
- type
- PolicyLevelType
一个枚举值,其指定要加载的策略级别类型。One of the enumeration values that specifies the type of the policy level to be loaded.
返回
已加载的策略级别。The loaded policy level.
- 属性
例外
str 参数为 null。The str parameter is null.
str 参数无效。The str parameter is not valid.
调用此方法的代码不含 ControlPolicy。The code that calls this method does not have ControlPolicy.