Check() public méthode

public Check ( Evidence evidence ) : bool
evidence Evidence
Résultat bool
		public void Check ()
		{
			ApplicationDirectoryMembershipCondition ad = new ApplicationDirectoryMembershipCondition ();
			Evidence e = null;
			Assert.IsFalse (ad.Check (e), "Check (null)");
			e = new Evidence ();
			Assert.IsFalse (ad.Check (e), "Check (empty)");
			e.AddHost (new Zone (SecurityZone.MyComputer));
			Assert.IsFalse (ad.Check (e), "Check (zone)");

			string codebase = Assembly.GetExecutingAssembly ().CodeBase;
			Url u = new Url (codebase);
			ApplicationDirectory adir = new ApplicationDirectory (codebase);

			e.AddHost (u);
			Assert.IsFalse (ad.Check (e), "Check (url-host)"); // not enough
			e.AddAssembly (adir);
			Assert.IsFalse (ad.Check (e), "Check (url-host+adir-assembly)");

			e = new Evidence ();
			e.AddHost (adir);
			Assert.IsFalse (ad.Check (e), "Check (adir-host)"); // not enough
			e.AddAssembly (u);
			Assert.IsFalse (ad.Check (e), "Check (url-assembly+adir-host)");

			e = new Evidence ();
			e.AddHost (u);
			e.AddHost (adir);
			Assert.IsTrue (ad.Check (e), "Check (url+adir host)"); // both!!
		}
 public static void ApplicationDirectoryMembershipConditionCallMethods()
 {
     ApplicationDirectoryMembershipCondition admc = new ApplicationDirectoryMembershipCondition();
     bool check = admc.Check(new Evidence());
     IMembershipCondition obj = admc.Copy();
     check = admc.Equals(new object());
     int hash = admc.GetHashCode();
     string str = admc.ToString();
     SecurityElement se = new SecurityElement("");
     PolicyLevel pl = (PolicyLevel)Activator.CreateInstance(typeof(PolicyLevel), true);
     admc.FromXml(se);
     admc.FromXml(se, pl);
     se = admc.ToXml();
     se = admc.ToXml(pl);
 }