SecurityManager.LoadPolicyLevelFromString(String, PolicyLevelType) Method

Definition

Warning

This API is now obsolete.

Loads a PolicyLevel from the specified string.

public:
 static System::Security::Policy::PolicyLevel ^ LoadPolicyLevelFromString(System::String ^ str, System::Security::PolicyLevelType type);
[System.Obsolete]
[System.Obsolete("This method is obsolete and will be removed in a future release of the .NET Framework. See https://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
Public Shared Function LoadPolicyLevelFromString (str As String, type As PolicyLevelType) As PolicyLevel

Parameters

str
String

The XML representation of a security policy level in the same form in which it appears in a configuration file.

type
PolicyLevelType

One of the enumeration values that specifies the type of the policy level to be loaded.

Returns

The loaded policy level.

Attributes

Exceptions

The str parameter is null.

The str parameter is not valid.

The code that calls this method does not have ControlPolicy.

Security

SecurityPermission
for the ability to view and modify policy. Associated enumeration: ControlPolicy

Applies to