System.Security.SecurityManager.SecurityManager.LoadPolicyLevelFromString C# (CSharp) Method

LoadPolicyLevelFromString() private method

private LoadPolicyLevelFromString ( string str, PolicyLevelType type ) : PolicyLevel
str string
type PolicyLevelType
return System.Security.Policy.PolicyLevel
		public static PolicyLevel LoadPolicyLevelFromString (string str, PolicyLevelType type)
		{
			if (null == str)
				throw new ArgumentNullException ("str");

			PolicyLevel pl = null;
			try {
				pl = new PolicyLevel (type.ToString (), type);
				pl.LoadFromString (str);
			}
			catch (Exception e) {
				throw new ArgumentException (Locale.GetText ("Invalid policy XML"), e);
			}
			return pl;
		}