Intersect() public method

public Intersect ( IPermission target ) : IPermission
target IPermission
return IPermission
		public void Intersect ()
		{
			IsolatedStorageFilePermission empty = new IsolatedStorageFilePermission (PermissionState.None);
			IsolatedStorageFilePermission intersect = (IsolatedStorageFilePermission)empty.Intersect (null);
			Assert.IsNull (intersect, "empty N null");

			intersect = (IsolatedStorageFilePermission)empty.Intersect (empty);
			Assert.IsNull (intersect, "empty N empty");

			IsolatedStorageFilePermission unrestricted = new IsolatedStorageFilePermission (PermissionState.Unrestricted);
			intersect = (IsolatedStorageFilePermission)unrestricted.Intersect (null);
			Assert.IsNull (intersect, "unrestricted N null");

			intersect = (IsolatedStorageFilePermission)unrestricted.Intersect (empty);
			Assert.IsNotNull (intersect, "unrestricted N empty");

			intersect = (IsolatedStorageFilePermission)unrestricted.Intersect (unrestricted);
			Assert.IsNotNull (intersect, "unrestricted N unrestricted");
		}
		public void Intersect_DifferentPermissions ()
		{
			IsolatedStorageFilePermission a = new IsolatedStorageFilePermission (PermissionState.None);
			SecurityPermission b = new SecurityPermission (PermissionState.None);
			a.Intersect (b);
		}