2 // Microsoft.Web.Services.Addressing.Recipient.cs
4 // Author: Todd Berman <tberman@gentoo.org>
6 // (C) 2003 Todd Berman
10 using Microsoft.Web.Services.Xml;
12 namespace Microsoft.Web.Services.Addressing
14 public class Recipient : EndpointReferenceType, IXmlElement
16 public Recipient (Address address) : base (address)
20 public Recipient (Uri uri) : base (uri)
24 public Recipient (XmlElement element) : base ()
29 public XmlElement GetXml (XmlDocument document)
31 XmlElement element = document.CreateElement ("wsa",
33 "http://schemas.xmlsoap.org/2003/03/addressing");
35 GetXmlAny (document, element);
39 public void LoadXml (XmlElement element)
42 throw new ArgumentNullException ("element");
44 if(element.LocalName != "Recipient" || element.LocalName != "http://schemas.xmlsoap.org/2003/03/addressing") {
45 throw new ArgumentException ("Invalid Element Supplied");
51 public static implicit operator Recipient (Uri uri)
53 return new Recipient (uri);
56 public static implicit operator Uri (Recipient obj)
61 return obj.Address.Value;