FromXml() public méthode

public FromXml ( SecurityElement e ) : void
e System.Security.SecurityElement
Résultat void
 public static void AllMembershipConditionCallMethods()
 {
     AllMembershipCondition amc = new AllMembershipCondition();
     bool check = amc.Check(new Evidence());
     IMembershipCondition imc = amc.Copy();
     check = amc.Equals(new object());
     int hash = amc.GetHashCode();
     string str = amc.ToString();
     SecurityElement se = new SecurityElement("");
     PolicyLevel pl = (PolicyLevel)Activator.CreateInstance(typeof(PolicyLevel), true);
     amc.FromXml(se);
     amc.FromXml(se, pl);
     se = amc.ToXml();
     se = amc.ToXml(pl);
 }
		public void FromXml ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			SecurityElement se = all.ToXml ();
			all.FromXml (se);
		}
		public void FromXml_Null ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			all.FromXml (null);
		}
		public void FromXml_PolicyLevelNull ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			SecurityElement se = all.ToXml ();
			all.FromXml (se, null);
		}
		public void FromXml_SecurityElementNull ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			all.FromXml (null, PolicyLevel.CreateAppDomainLevel ());
		}
		public void FromXml_NoVersion ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			SecurityElement se = all.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("class", se.Attribute ("class"));
			all.FromXml (w);
		}
		public void FromXml_InvalidVersion ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			SecurityElement se = all.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("class", se.Attribute ("class"));
			w.AddAttribute ("version", "2");
			all.FromXml (w);
			// doesn't seems to care about the version number!
		}
		public void FromXml_NoClass ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			SecurityElement se = all.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("version", se.Attribute ("version"));
			all.FromXml (w);
			// doesn't even care of the class attribute presence
		}
		public void FromXml_InvalidClass ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			SecurityElement se = all.ToXml ();
			se.Attributes ["class"] = "Hello world";
			all.FromXml (se);
		}
		public void FromXml_WrongTagCase ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			SecurityElement se = all.ToXml ();
			se.Tag = "IMEMBERSHIPCONDITION"; // instead of IMembershipCondition
			all.FromXml (se);
		}
		public void FromXml_InvalidTag ()
		{
			AllMembershipCondition all = new AllMembershipCondition ();
			SecurityElement se = all.ToXml ();
			se.Tag = "IMonoship";
			all.FromXml (se);
		}