remove svn:executable from .cs files
[mono.git] / mcs / class / Microsoft.Web.Services / Microsoft.Web.Services.Addressing / PortType.cs
1 //
2 // Microsoft.Web.Services.Addressing.PortType.cs
3 //
4 // Author: Todd Berman <tberman@gentoo.org>
5 //
6 // (C) 2003 Todd Berman
7
8 using System;
9 using System.Xml;
10 using Microsoft.Web.Services.Xml;
11
12 namespace Microsoft.Web.Services.Addressing
13 {
14
15         public class PortType : AttributedQName, IXmlElement
16         {
17
18                 public PortType (XmlElement element) : base ()
19                 {
20                         LoadXml (element);
21                 }
22
23                 public PortType (QualifiedName qname) : base (qname)
24                 {
25                 }
26
27                 public XmlElement GetXml (XmlDocument document)
28                 {
29                         if(document == null) {
30                                 throw new ArgumentNullException ("document");
31                         }
32                         XmlElement element = document.CreateElement("wsa",
33                                                                     "PortType",
34                                                                     "http://schemas.xmlsoap.org/ws/2003/03/addressing");
35                         GetXmlQName (document, element);
36                         
37                         return element;
38                 }
39
40                 public void LoadXml (XmlElement element)
41                 {
42                         if(element == null) {
43                                 throw new ArgumentNullException ("element");
44                         }
45                         if(element.LocalName != "PortType" || element.NamespaceURI != "http://schemas.xmlsoap.org/ws/2003/03/addressing") {
46                                 throw new ArgumentException ("Invalid Element Supplied");
47                         }
48                         LoadXmlQName (element);
49                 }
50
51         }
52
53 }