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

LoadPolicyLevelFromFile() private method

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

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