SecurityManager.LoadPolicyLevelFromString(String, PolicyLevelType) Metod

Definition

Varning

Det här API:et är nu inaktuellt.

Varning

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.

Läser in en PolicyLevel från den angivna strängen.

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

Parametrar

str
String

XML-representationen av en säkerhetsprincipnivå i samma form som den visas i en konfigurationsfil.

type
PolicyLevelType

Ett av uppräkningsvärdena som anger vilken typ av principnivå som ska läsas in.

Returer

Den inlästa principnivån.

Attribut

Undantag

Parametern str är null.

Parametern str är inte giltig.

Koden som anropar den här metoden har ControlPolicyinte .

Gäller för