System.Security.Policy.UrlMembershipCondition.ToXml C# (CSharp) Method

ToXml() public method

public ToXml ( ) : SecurityElement
return SecurityElement
        public SecurityElement ToXml() { return default(SecurityElement); }
        public SecurityElement ToXml(PolicyLevel level) { return default(SecurityElement); }

Same methods

UrlMembershipCondition::ToXml ( PolicyLevel level ) : SecurityElement
UrlMembershipCondition::ToXml ( ) : System.Security.SecurityElement
UrlMembershipCondition::ToXml ( System level ) : System.Security.SecurityElement

Usage Example

		public void ToXml_PolicyLevel () 
		{
			UrlMembershipCondition umc = new UrlMembershipCondition ("http://www.go-mono.com");
			SecurityElement se = umc.ToXml ();
			string s = umc.ToXml ().ToString ();
			// is it accepted for all policy levels ?
			IEnumerator e = SecurityManager.PolicyHierarchy ();
			while (e.MoveNext ()) {
				PolicyLevel pl = e.Current as PolicyLevel;
				UrlMembershipCondition spl = new UrlMembershipCondition ("*");
				spl.FromXml (se, pl);
				Assert.AreEqual (s, spl.ToXml (pl).ToString (), "ToXml(PolicyLevel='" + pl.Label + "')");
			}
			// yes!
		}
All Usage Examples Of System.Security.Policy.UrlMembershipCondition::ToXml