CreatePermission() public méthode

public CreatePermission ( ) : IPermission
Résultat IPermission
		public void Default () 
		{
			ZoneIdentityPermissionAttribute a = new ZoneIdentityPermissionAttribute (SecurityAction.Assert);
			Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId");
			Assert.IsFalse (a.Unrestricted, "Unrestricted");
			Assert.AreEqual (SecurityZone.NoZone, a.Zone, "Zone");

			ZoneIdentityPermission perm = (ZoneIdentityPermission) a.CreatePermission ();
			Assert.AreEqual (SecurityZone.NoZone, perm.SecurityZone, "CreatePermission-SecurityZone");
		}
		public void Unrestricted () 
		{
			ZoneIdentityPermissionAttribute a = new ZoneIdentityPermissionAttribute (SecurityAction.Assert);
			a.Unrestricted = true;
			IPermission perm = a.CreatePermission ();
		}