Merge pull request #1840 from ludovic-henry/iolayer-thread-interrupt
[mono.git] / mcs / class / System.Web / System.Web / HttpServerUtilityWrapper.cs
1 //
2 // HttpServerUtilityWrapper.cs
3 //
4 // Author:
5 //      Atsushi Enomoto <atsushi@ximian.com>
6 //
7 // Copyright (C) 2008 Novell Inc. http://novell.com
8 //
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 using System;
31 using System.Collections;
32 using System.Collections.Generic;
33 using System.Collections.Specialized;
34 using System.Globalization;
35 using System.IO;
36 using System.Runtime.CompilerServices;
37 using System.Security.Permissions;
38 using System.Security.Principal;
39 using System.Web.Caching;
40 using System.Web.Profile;
41
42 namespace System.Web
43 {
44         [TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
45         [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
46         [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
47         public class HttpServerUtilityWrapper : HttpServerUtilityBase
48         {
49                 HttpServerUtility w;
50
51                 public HttpServerUtilityWrapper (HttpServerUtility httpServerUtility)
52                 {
53                         if (httpServerUtility == null)
54                                 throw new ArgumentNullException ("httpServerUtility");
55                         w = httpServerUtility;
56                 }
57
58                 public override string MachineName {
59                         get { return w.MachineName; }
60                 }
61
62                 public override int ScriptTimeout {
63                         get { return w.ScriptTimeout; }
64                         set { w.ScriptTimeout = value; }
65                 }
66
67                 public override void ClearError ()
68                 {
69                         w.ClearError ();
70                 }
71
72                 public override object CreateObject (string progID)
73                 {
74                         return w.CreateObject (progID);
75                 }
76
77                 public override object CreateObject (Type type)
78                 {
79                         return w.CreateObject (type);
80                 }
81
82                 public override object CreateObjectFromClsid (string clsid)
83                 {
84                         return w.CreateObjectFromClsid (clsid);
85                 }
86
87                 public override void Execute (string path)
88                 {
89                         w.Execute (path);
90                 }
91
92                 public override void Execute (string path, bool preserveForm)
93                 {
94                         w.Execute (path, preserveForm);
95                 }
96
97                 public override void Execute (string path, TextWriter writer)
98                 {
99                         w.Execute (path, writer);
100                 }
101
102                 public override void Execute (string path, TextWriter writer, bool preserveForm)
103                 {
104                         w.Execute (path, writer, preserveForm);
105                 }
106
107                 public override void Execute (IHttpHandler handler, TextWriter writer, bool preserveForm)
108                 {
109                         w.Execute (handler, writer, preserveForm);
110                 }
111
112                 public override Exception GetLastError ()
113                 {
114                         return w.GetLastError ();
115                 }
116
117                 public override string HtmlDecode (string s)
118                 {
119                         return w.HtmlDecode (s);
120                 }
121
122                 public override void HtmlDecode (string s, TextWriter output)
123                 {
124                         w.HtmlDecode (s, output);
125                 }
126
127                 public override string HtmlEncode (string s)
128                 {
129                         return w.HtmlEncode (s);
130                 }
131
132                 public override void HtmlEncode (string s, TextWriter output)
133                 {
134                         w.HtmlEncode (s, output);
135                 }
136
137                 public override string MapPath (string path)
138                 {
139                         return w.MapPath (path);
140                 }
141
142                 public override void Transfer (string path)
143                 {
144                         w.Transfer (path);
145                 }
146
147                 public override void Transfer (string path, bool preserveForm)
148                 {
149                         w.Transfer (path, preserveForm);
150                 }
151
152                 public override void Transfer (IHttpHandler handler, bool preserveForm)
153                 {
154                         w.Transfer (handler, preserveForm);
155                 }
156
157                 [MonoTODO]
158                 public override void TransferRequest (string path)
159                 {
160                         // return TransferRequest (path);
161                         throw new NotImplementedException ();
162                 }
163
164                 [MonoTODO]
165                 public override void TransferRequest (string path, bool preserveForm)
166                 {
167                         // return TransferRequest (path, preserveForm);
168                         throw new NotImplementedException ();
169                 }
170
171                 [MonoTODO]
172                 public override void TransferRequest (string path, bool preserveForm, string method, NameValueCollection headers)
173                 {
174                         // return TransferRequest (path, preserveForm, method, headers);
175                         throw new NotImplementedException ();
176                 }
177
178                 public override string UrlDecode (string s)
179                 {
180                         return w.UrlDecode (s);
181                 }
182
183                 public override void UrlDecode (string s, TextWriter output)
184                 {
185                         w.UrlDecode (s, output);
186                 }
187
188                 public override string UrlEncode (string s)
189                 {
190                         return w.UrlEncode (s);
191                 }
192
193                 public override void UrlEncode (string s, TextWriter output)
194                 {
195                         w.UrlEncode (s, output);
196                 }
197
198                 public override string UrlPathEncode (string s)
199                 {
200                         return w.UrlPathEncode (s);
201                 }
202
203                 [MonoTODO]
204                 public override byte [] UrlTokenDecode (string input)
205                 {
206                         // return w.UrlTokenDecode (input);
207                         throw new NotImplementedException ();
208                 }
209
210                 [MonoTODO]
211                 public override string UrlTokenEncode (byte [] input)
212                 {
213                         // return w.UrlTokenEncode (input);
214                         throw new NotImplementedException ();
215                 }
216         }
217 }