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

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 表示形式,与它在配置文件出现的形式相同。

type
PolicyLevelType

一个枚举值,其指定要加载的策略级别类型。

返回

已加载的策略级别。

属性

例外

str 参数为 null

str 参数无效。

调用此方法的代码不含 ControlPolicy

适用于