SecurityManager.LoadPolicyLevelFromString(String, PolicyLevelType) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
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.
從指定的字串載入 a PolicyLevel 。
public:
static System::Security::Policy::PolicyLevel ^ LoadPolicyLevelFromString(System::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);
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。