Share via


SecurityManager.LoadPolicyLevelFromString(String, PolicyLevelType) Méthode

Définition

Attention

Cette API est à présent déconseillée.

Attention

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.

Charge PolicyLevel à partir de la chaîne spécifiée.

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

Paramètres

str
String

Représentation XML d'un niveau de stratégie de sécurité dans le même format que celui dans lequel il apparaît dans un fichier de configuration.

type
PolicyLevelType

Une des valeurs d’énumération qui spécifie le type du niveau de stratégie à charger.

Retours

Le niveau de stratégie chargé.

Attributs

Exceptions

Le paramètre str a la valeur null.

Le paramètre str n'est pas valide.

Le code qui appelle cette méthode ne dispose pas de ControlPolicy.

S’applique à