FromXml() public method

public FromXml ( SecurityElement esd ) : void
esd SecurityElement
return void
		public void FromXmlWrongVersion () 
		{
			EnvironmentPermission ep = new EnvironmentPermission (PermissionState.None);
			SecurityElement se = ep.ToXml ();
			// can't modify - so we create our own
			SecurityElement se2 = new SecurityElement (se.Tag, se.Text);
			se2.AddAttribute ("class", se.Attribute ("class"));
			se2.AddAttribute ("version", "2");
			ep.FromXml (se2);
		}
		public void FromXml () 
		{
			EnvironmentPermission ep = new EnvironmentPermission (PermissionState.None);
			SecurityElement se = ep.ToXml ();
			AssertNotNull ("ToXml()", se);
			ep.FromXml (se);
			se.AddAttribute ("Read", envVariables);
			ep.FromXml (se);
			AssertEquals ("FromXml-Read", envVariables, ep.GetPathList (EnvironmentPermissionAccess.Read));
			se.AddAttribute ("Write", envVariables);
			ep.FromXml (se);
			AssertEquals ("FromXml-Read", envVariables, ep.GetPathList (EnvironmentPermissionAccess.Read));
			AssertEquals ("FromXml-Write", envVariables, ep.GetPathList (EnvironmentPermissionAccess.Write));
		}
		public void FromXmlNull () 
		{
			EnvironmentPermission ep = new EnvironmentPermission (PermissionState.None);
			ep.FromXml (null);
		}