Intersect() 공개 메소드

public Intersect ( IPermission target ) : IPermission
target IPermission
리턴 IPermission
예제 #1
0
		public void Intersect_null ()
		{
			ConfigurationPermission p1 = new ConfigurationPermission (PermissionState.Unrestricted);

			IPermission p3 = p1.Intersect (null);

			Assert.IsNull (p3, "A1");
		}
예제 #2
0
		public void Intersect ()
		{
			ConfigurationPermission p1 = new ConfigurationPermission (PermissionState.Unrestricted);
			ConfigurationPermission p2 = new ConfigurationPermission (PermissionState.None);

			IPermission p3 = p1.Intersect (p2);

			Assert.AreEqual (typeof (ConfigurationPermission), p3.GetType(), "A1");

			Assert.IsFalse (((ConfigurationPermission)p3).IsUnrestricted(), "A2");
		}
예제 #3
0
		public void Intersect_wrongtype ()
		{
			ConfigurationPermission p1 = new ConfigurationPermission (PermissionState.Unrestricted);

			IPermission p3 = p1.Intersect (new StrongNameIdentityPermission (PermissionState.Unrestricted));
		}