Udostępnij przez


SecurityManager.LoadPolicyLevelFromString(String, PolicyLevelType) Metoda

Definicja

Przestroga

Ten interfejs API jest już przestarzały.

Przestroga

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.

Ładuje element PolicyLevel z określonego ciągu.

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

Parametry

str
String

Reprezentacja XML poziomu zasad zabezpieczeń w tym samym formacie, w którym jest wyświetlana w pliku konfiguracji.

type
PolicyLevelType

Jedna z wartości wyliczenia, która określa typ poziomu zasad do załadowania.

Zwraca

Załadowany poziom zasad.

Atrybuty

Wyjątki

Parametr str to null.

Parametr str jest nieprawidłowy.

Kod, który wywołuje tę metodę, nie ma ControlPolicyelementu .

Dotyczy