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

適用於