[runtime] Overwrite stacktrace for exception on re-throw. Fixes #1856.
[mono.git] / mcs / class / System.Runtime.Serialization / System.Xml / XmlSimpleDictionaryWriter.cs
1 //
2 // XmlDictionaryWriter.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 using System;
29 using System.IO;
30 using System.Text;
31
32 namespace System.Xml
33 {
34         internal class XmlSimpleDictionaryWriter : XmlDictionaryWriter
35         {
36                 XmlWriter writer;
37
38                 // FIXME: find out how soapCompliant argument is used.
39                 public XmlSimpleDictionaryWriter (XmlWriter writer)
40                 {
41                         this.writer = writer;
42                 }
43
44                 public override void Close ()
45                 {
46                         writer.Close ();
47                 }
48
49                 public override void Flush ()
50                 {
51                         writer.Flush ();
52                 }
53
54                 public override string LookupPrefix (string ns)
55                 {
56                         return writer.LookupPrefix (ns);
57                 }
58
59                 public override void WriteBase64 (byte [] buffer, int index, int count)
60                 {
61                         writer.WriteBase64 (buffer, index, count);
62                 }
63
64                 public override void WriteBinHex (byte [] buffer, int index, int count)
65                 {
66                         writer.WriteBinHex (buffer, index, count);
67                 }
68
69                 public override void WriteCData (string text)
70                 {
71                         writer.WriteCData (text);
72                 }
73
74                 public override void WriteCharEntity (char ch)
75                 {
76                         writer.WriteCharEntity (ch);
77                 }
78
79                 public override void WriteChars (char [] buffer, int index, int count)
80                 {
81                         writer.WriteChars (buffer, index, count);
82                 }
83
84                 public override void WriteComment (string text)
85                 {
86                         writer.WriteComment (text);
87                 }
88
89                 public override void WriteDocType (string name, string pubid, string sysid, string subset)
90                 {
91                         writer.WriteDocType (name, pubid, sysid, subset);
92                 }
93
94                 public override void WriteEndAttribute ()
95                 {
96                         writer.WriteEndAttribute ();
97                 }
98
99                 public override void WriteEndDocument ()
100                 {
101                         writer.WriteEndDocument ();
102                 }
103
104                 public override void WriteEndElement ()
105                 {
106                         Depth--;
107                         NSIndex = 0;
108                         writer.WriteEndElement ();
109                 }
110
111                 public override void WriteEntityRef (string name)
112                 {
113                         writer.WriteEntityRef (name);
114                 }
115
116                 public override void WriteFullEndElement ()
117                 {
118                         writer.WriteFullEndElement ();
119                 }
120
121                 public override void WriteName (string name)
122                 {
123                         writer.WriteName (name);
124                 }
125
126                 public override void WriteNmToken (string name)
127                 {
128                         writer.WriteNmToken (name);
129                 }
130
131                 public override void WriteNode (XmlReader reader, bool defattr)
132                 {
133                         writer.WriteNode (reader, defattr);
134                 }
135
136                 public override void WriteProcessingInstruction (string name, string text)
137                 {
138                         writer.WriteProcessingInstruction (name, text);
139                 }
140
141                 public override void WriteQualifiedName (string localName, string ns)
142                 {
143                         writer.WriteQualifiedName (localName, ns);
144                 }
145
146                 public override void WriteRaw (string data)
147                 {
148                         writer.WriteRaw (data);
149                 }
150
151                 public override void WriteRaw (char [] buffer, int index, int count)
152                 {
153                         writer.WriteRaw (buffer, index, count);
154                 }
155
156                 public override void WriteStartAttribute (string prefix, string localName, string ns)
157                 {
158                         writer.WriteStartAttribute (prefix, localName, ns);
159                 }
160
161                 public override void WriteStartDocument (bool standalone)
162                 {
163                         writer.WriteStartDocument (standalone);
164                 }
165
166                 public override void WriteStartDocument ()
167                 {
168                         writer.WriteStartDocument ();
169                 }
170
171                 public override void WriteStartElement (string prefix, string localName, string ns)
172                 {
173                         Depth++;
174                         NSIndex = 0;
175                         writer.WriteStartElement (prefix, localName, ns);
176                 }
177
178                 public override void WriteString (string text)
179                 {
180                         writer.WriteString (text);
181                 }
182
183                 public override void WriteSurrogateCharEntity (char lowChar, char highChar)
184                 {
185                         writer.WriteSurrogateCharEntity (lowChar, highChar);
186                 }
187
188                 public override void WriteWhitespace (string ws)
189                 {
190                         writer.WriteWhitespace (ws);
191                 }
192
193                 public override WriteState WriteState {
194                         get {
195                                 return writer.WriteState;
196                         }
197                 }
198
199                 public override string XmlLang {
200                         get {
201                                 return writer.XmlLang;
202                         }
203                 }
204
205                 public override XmlSpace XmlSpace {
206                         get {
207                                 return writer.XmlSpace;
208                         }
209                 }
210
211         }
212 }