CreatePermission() публичный Метод

public CreatePermission ( ) : IPermission
Результат IPermission
		public void Default () 
		{
			StrongNameIdentityPermissionAttribute a = new StrongNameIdentityPermissionAttribute (SecurityAction.Assert);
			Assert.IsNull (a.Name, "Name");
			Assert.IsNull (a.PublicKey, "PublicKey");
			Assert.IsNull (a.Version, "Version");
			Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId");
			Assert.IsTrue (!a.Unrestricted, "Unrestricted");

			StrongNameIdentityPermission perm = (StrongNameIdentityPermission) a.CreatePermission ();
			Assert.AreEqual (String.Empty, perm.Name, "CreatePermission.Name");
			Assert.IsNull (perm.PublicKey, "CreatePermission.PublicKey");
			Assert.AreEqual ("0.0", perm.Version.ToString (), "CreatePermission.Version");
		}
		public void Unrestricted () 
		{
			StrongNameIdentityPermissionAttribute a = new StrongNameIdentityPermissionAttribute (SecurityAction.Assert);
			a.Unrestricted = true;
			IPermission perm = a.CreatePermission ();
		}
		public void CreatePermission () 
		{
			StrongNameIdentityPermissionAttribute a = new StrongNameIdentityPermissionAttribute (SecurityAction.Assert);
			a.Name = "mono";
			a.PublicKey = pk;
			a.Version = "1.2.3.4";
			StrongNameIdentityPermission p = (StrongNameIdentityPermission)a.CreatePermission ();
			Assert.AreEqual ("mono", p.Name, "Name");
			Assert.AreEqual (pk, p.PublicKey.ToString (), "PublicKey");
			Assert.AreEqual ("1.2.3.4", p.Version.ToString (), "Version");
		}
		public void CreatePermission_NameVersion () 
		{
			StrongNameIdentityPermissionAttribute a = new StrongNameIdentityPermissionAttribute (SecurityAction.Assert);
			a.Name = "mono";
			a.Version = "1.2.3.4";
			IPermission perm = a.CreatePermission ();
		}
		public void CreatePermission_OnlyPublicKey () 
		{
			StrongNameIdentityPermissionAttribute a = new StrongNameIdentityPermissionAttribute (SecurityAction.Assert);
			a.PublicKey = pk;
			StrongNameIdentityPermission p = (StrongNameIdentityPermission)a.CreatePermission ();
			Assert.IsNull (p.Name, "Name");
			Assert.AreEqual (pk, p.PublicKey.ToString (), "PublicKey");
			Assert.IsNull (p.Version, "Version");
		}
		public void CreatePermission_OnlyName () 
		{
			StrongNameIdentityPermissionAttribute a = new StrongNameIdentityPermissionAttribute (SecurityAction.Assert);
			a.Name = "mono";
			IPermission perm = a.CreatePermission ();
		}