CreatePermission() public method

public CreatePermission ( ) : IPermission
return IPermission
		public void Default () 
		{
			RegistryPermissionAttribute a = new RegistryPermissionAttribute (SecurityAction.Assert);
			Assert.IsNull (a.Create, "Create");
			Assert.IsNull (a.Read, "Read");
			Assert.IsNull (a.Write, "Write");
			Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl");
			Assert.IsNull (a.ViewAccessControl, "ViewAccessControl");
			Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId");
			Assert.IsFalse (a.Unrestricted, "Unrestricted");

			RegistryPermission perm = (RegistryPermission) a.CreatePermission ();
			Assert.AreEqual (String.Empty, perm.GetPathList (RegistryPermissionAccess.Create), "Create");
			Assert.AreEqual (String.Empty, perm.GetPathList (RegistryPermissionAccess.Read), "Read");
			Assert.AreEqual (String.Empty, perm.GetPathList (RegistryPermissionAccess.Write), "Write");
		}
		public void Unrestricted () 
		{
			RegistryPermissionAttribute a = new RegistryPermissionAttribute (SecurityAction.Assert);
			a.Unrestricted = true;

			RegistryPermission perm = (RegistryPermission) a.CreatePermission ();
			Assert.IsTrue (perm.IsUnrestricted (), "CreatePermission.IsUnrestricted");
		}