FromXml() публичный Метод

public FromXml ( SecurityElement esd ) : void
esd SecurityElement
Результат void
Пример #1
0
		public void FromXml_WrongVersion ()
		{
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None);
			SecurityElement se = uip.ToXml ();
			se.Attributes.Remove ("version");
			se.Attributes.Add ("version", "2");
			uip.FromXml (se);
		}
Пример #2
0
		public void FromXml_NoVersion ()
		{
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None);
			SecurityElement se = uip.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("class", se.Attribute ("class"));
			uip.FromXml (w);
		}
Пример #3
0
		public void FromXml_NoClass ()
		{
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None);
			SecurityElement se = uip.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("version", se.Attribute ("version"));
			uip.FromXml (w);
			// doesn't even care of the class attribute presence
		}
Пример #4
0
		public void FromXml_WrongClass ()
		{
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None);
			SecurityElement se = uip.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("class", "Wrong" + se.Attribute ("class"));
			w.AddAttribute ("version", se.Attribute ("version"));
			uip.FromXml (w);
			// doesn't care of the class name at that stage
			// anyway the class has already be created so...
		}
Пример #5
0
		public void FromXml_WrongTagCase ()
		{
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None);
			SecurityElement se = uip.ToXml ();
			se.Tag = "IPERMISSION"; // instead of IPermission
			uip.FromXml (se);
		}
Пример #6
0
		public void FromXml_WrongTag ()
		{
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None);
			SecurityElement se = uip.ToXml ();
			se.Tag = "IMono";
			uip.FromXml (se);
		}
Пример #7
0
		public void FromXml_Null ()
		{
			UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None);
			uip.FromXml (null);
		}