(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / Microsoft.Web.Services / Microsoft.Web.Services.Addressing / EndpointReferenceType.cs
blob1a89cd5c24391d9b693e68cb688b2752ecc5a4a9
1 //
2 // Microsoft.Web.Services.Addressing
3 //
4 // Author: Todd Berman <tberman@gentoo.org>
5 //
6 // (C) 2003 Todd Berman
8 using System;
9 using System.Xml;
10 using Microsoft.Web.Services.Xml;
12 namespace Microsoft.Web.Services.Addressing
15 public abstract class EndpointReferenceType : OpenElement
18 private Address _address;
19 private PortType _portType;
20 private ReferenceProperties _properties;
21 private ServiceName _serviceName;
23 public EndpointReferenceType (Uri address) : base ()
25 if(address == null) {
26 throw new ArgumentNullException ("address");
28 _address = new Address (address);
31 public EndpointReferenceType (Address address) : base ()
33 if(address == null) {
34 throw new ArgumentNullException ("address");
36 _address = address;
39 public EndpointReferenceType () : base ()
43 protected override void GetXmlAny (XmlDocument document, XmlElement element)
45 if(document == null) {
46 throw new ArgumentNullException ("document");
48 if(element == null) {
49 throw new ArgumentNullException ("element");
52 element.AppendChild (_address.GetXml (document));
54 if(_portType != null) {
55 element.AppendChild (_portType.GetXml (document));
58 if(_properties != null) {
59 element.AppendChild (_properties.GetXml (document));
62 if(_serviceName != null) {
63 element.AppendChild (_serviceName.GetXml (document));
66 base.GetXmlAny (document, element);
69 protected override void LoadXmlAny (XmlElement element)
71 if(element == null) {
72 throw new ArgumentNullException ("element");
75 foreach (XmlAttribute attrib in element.Attributes) {
76 AnyAttributes.Add (attrib);
79 foreach (XmlElement node in element.ChildNodes) {
80 if(node.NamespaceURI != "http://schemas.xmlsoap.org/ws/2003/03/addressing") {
81 continue;
83 switch (node.LocalName) {
84 case "Address":
85 _address = new Address (node);
86 continue;
87 case "ReferenceProperties":
88 _properties = new ReferenceProperties (node);
89 continue;
90 case "PortType":
91 _portType = new PortType (node);
92 continue;
93 case "ServiceName":
94 _serviceName = new ServiceName (node);
95 continue;
98 AnyElements.Add (node);
102 public Address Address {
103 get { return _address; }
104 set {
105 if(value == null) {
106 throw new ArgumentNullException ("Address");
108 _address = value;
112 public PortType PortType {
113 get { return _portType; }
114 set { _portType = value; }
117 public ReferenceProperties ReferenceProperties {
118 get { return _properties; }
119 set { _properties = value; }
122 public ServiceName ServiceName {
123 get { return _serviceName; }
124 set { _serviceName = value; }