Merge pull request #4453 from lambdageek/bug-49721
[mono.git] / mcs / class / System.ServiceModel / System.ServiceModel.Dispatcher / XPathMessageFilter.cs
1 //
2 // XPathMessageFilter.cs
3 //
4 // Author:
5 //      Atsushi Enomoto  <atsushi@ximian.com>
6 //
7 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
16 // 
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19 // 
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28
29 using System;
30 using System.Collections.Generic;
31 using System.Collections.ObjectModel;
32 using System.ServiceModel;
33 using System.ServiceModel.Channels;
34 using System.Xml;
35 using System.Xml.Schema;
36 using System.Xml.Serialization;
37 using System.Xml.XPath;
38 using System.Xml.Xsl;
39
40 namespace System.ServiceModel.Dispatcher
41 {
42         [MonoTODO]
43         [XmlRoot ("XPathMessageFilter", Namespace = "http://schemas.microsoft.com/serviceModel/2004/05/xpathfilter")]
44         [XmlSchemaProvider ("StaticGetSchema")]
45         public class XPathMessageFilter : MessageFilter, IXmlSerializable
46         {
47                 public static XmlSchemaType StaticGetSchema (XmlSchemaSet schemas)
48                 {
49                         throw new NotImplementedException ();
50                 }
51
52                 XmlNamespaceManager namespaces;
53                 int node_quota;
54                 string xpath;
55                 XPathExpression expr;
56
57                 public XPathMessageFilter ()
58                 {
59                 }
60
61                 public XPathMessageFilter (string xpath)
62                 {
63                         Initialize (xpath, null);
64                 }
65
66                 public XPathMessageFilter (string xpath, XmlNamespaceManager namespaces)
67                 {
68                         Initialize (xpath, namespaces);
69                 }
70
71                 public XPathMessageFilter (string xpath, XsltContext context)
72                 {
73                         Initialize (xpath, context);
74                 }
75
76                 [MonoTODO]
77                 public XPathMessageFilter (XmlReader reader)
78                         : this (reader, (XmlNamespaceManager) null)
79                 {
80                 }
81
82                 [MonoTODO]
83                 public XPathMessageFilter (XmlReader reader, XmlNamespaceManager namespaces)
84                 {
85                         Initialize (reader.ReadString (), namespaces);
86                 }
87
88                 [MonoTODO]
89                 public XPathMessageFilter (XmlReader reader, XsltContext context)
90                 {
91                         Initialize (reader.ReadString (), context);
92                 }
93
94                 private void Initialize (string xpath, XmlNamespaceManager nsmgr)
95                 {
96                         this.xpath = xpath;
97                         namespaces = nsmgr;
98                 }
99
100                 public XmlNamespaceManager Namespaces {
101                         get { return namespaces; }
102                 }
103
104                 public int NodeQuota {
105                         get { return node_quota; }
106                         set { node_quota = value; }
107                 }
108
109                 public string XPath {
110                         get { return xpath; }
111                 }
112
113                 protected internal override IMessageFilterTable<FilterData> CreateFilterTable<FilterData> ()
114                 {
115                         throw new NotImplementedException ();
116                 }
117
118                 public override bool Match (Message message)
119                 {
120                         throw new NotImplementedException ();
121                 }
122
123                 public override bool Match (MessageBuffer messageBuffer)
124                 {
125                         throw new NotImplementedException ();
126                 }
127
128                 public bool Match (SeekableXPathNavigator navigator)
129                 {
130                         throw new NotImplementedException ();
131                 }
132
133                 public bool Match (XPathNavigator navigator)
134                 {
135                         throw new NotImplementedException ();
136                 }
137
138                 public void TrimToSize ()
139                 {
140                         expr = null;
141                         throw new NotImplementedException ();
142                 }
143
144                 public void WriteXPathTo (XmlWriter writer,
145                         string prefix, string localName, string ns,
146                         bool writeNamespaces)
147                 {
148                         throw new NotImplementedException ();
149                 }
150
151                 protected virtual XmlSchema OnGetSchema ()
152                 {
153                         throw new NotImplementedException ();
154                 }
155
156                 protected virtual void OnReadXml (XmlReader reader)
157                 {
158                         throw new NotImplementedException ();
159                 }
160
161                 protected virtual void OnWriteXml (XmlWriter writer)
162                 {
163                         throw new NotImplementedException ();
164                 }
165
166                 protected void ReadXPath (XmlReader reader,
167                         XmlNamespaceManager namespaces)
168                 {
169                         throw new NotImplementedException ();
170                 }
171
172                 protected void WriteXPath (XmlWriter writer,
173                         IXmlNamespaceResolver resolver)
174                 {
175                         throw new NotImplementedException ();
176                 }
177
178                 XmlSchema IXmlSerializable.GetSchema ()
179                 {
180                         throw new NotImplementedException ();
181                 }
182
183                 void IXmlSerializable.ReadXml (XmlReader reader)
184                 {
185                         throw new NotImplementedException ();
186                 }
187
188                 void IXmlSerializable.WriteXml (XmlWriter writer)
189                 {
190                         throw new NotImplementedException ();
191                 }
192         }
193 }