2009-06-12 Bill Holmes <billholmes54@gmail.com>
[mono.git] / mcs / class / System.Web.Abstractions / 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.Security.Permissions;
37 using System.Security.Principal;
38 using System.Web.Caching;
39 using System.Web.Profile;
40
41 namespace System.Web
42 {
43         [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
44         [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
45         public class HttpServerUtilityWrapper : HttpServerUtilityBase
46         {
47                 HttpServerUtility w;
48
49                 public HttpServerUtilityWrapper (HttpServerUtility httpServerUtility)
50                 {
51                         if (httpServerUtility == null)
52                                 throw new ArgumentNullException ("httpServerUtility");
53                         w = httpServerUtility;
54                 }
55
56                 public override string MachineName {
57                         get { return w.MachineName; }
58                 }
59
60                 public override int ScriptTimeout {
61                         get { return w.ScriptTimeout; }
62                         set { w.ScriptTimeout = value; }
63                 }
64
65                 public override void ClearError ()
66                 {
67                         w.ClearError ();
68                 }
69
70                 public override object CreateObject (string progID)
71                 {
72                         return w.CreateObject (progID);
73                 }
74
75                 public override object CreateObject (Type type)
76                 {
77                         return w.CreateObject (type);
78                 }
79
80                 public override object CreateObjectFromClsid (string clsid)
81                 {
82                         return w.CreateObjectFromClsid (clsid);
83                 }
84
85                 public override void Execute (string path)
86                 {
87                         w.Execute (path);
88                 }
89
90                 public override void Execute (string path, bool preserveForm)
91                 {
92                         w.Execute (path, preserveForm);
93                 }
94
95                 public override void Execute (string path, TextWriter writer)
96                 {
97                         w.Execute (path, writer);
98                 }
99
100                 public override void Execute (string path, TextWriter writer, bool preserveForm)
101                 {
102                         w.Execute (path, writer, preserveForm);
103                 }
104
105                 public override void Execute (IHttpHandler handler, TextWriter writer, bool preserveForm)
106                 {
107                         w.Execute (handler, writer, preserveForm);
108                 }
109
110                 public override Exception GetLastError ()
111                 {
112                         return w.GetLastError ();
113                 }
114
115                 public override string HtmlDecode (string s)
116                 {
117                         return w.HtmlDecode (s);
118                 }
119
120                 public override void HtmlDecode (string s, TextWriter output)
121                 {
122                         w.HtmlDecode (s, output);
123                 }
124
125                 public override string HtmlEncode (string s)
126                 {
127                         return w.HtmlEncode (s);
128                 }
129
130                 public override void HtmlEncode (string s, TextWriter output)
131                 {
132                         w.HtmlEncode (s, output);
133                 }
134
135                 public override string MapPath (string path)
136                 {
137                         return w.MapPath (path);
138                 }
139
140                 public override void Transfer (string path)
141                 {
142                         w.Transfer (path);
143                 }
144
145                 public override void Transfer (string path, bool preserveForm)
146                 {
147                         w.Transfer (path, preserveForm);
148                 }
149
150                 public override void Transfer (IHttpHandler handler, bool preserveForm)
151                 {
152                         w.Transfer (handler, preserveForm);
153                 }
154
155                 [MonoTODO]
156                 public override void TransferRequest (string path)
157                 {
158                         // return TransferRequest (path);
159                         throw new NotImplementedException ();
160                 }
161
162                 [MonoTODO]
163                 public override void TransferRequest (string path, bool preserveForm)
164                 {
165                         // return TransferRequest (path, preserveForm);
166                         throw new NotImplementedException ();
167                 }
168
169                 [MonoTODO]
170                 public override void TransferRequest (string path, bool preserveForm, string method, NameValueCollection headers)
171                 {
172                         // return TransferRequest (path, preserveForm, method, headers);
173                         throw new NotImplementedException ();
174                 }
175
176                 public override string UrlDecode (string s)
177                 {
178                         return w.UrlDecode (s);
179                 }
180
181                 public override void UrlDecode (string s, TextWriter output)
182                 {
183                         w.UrlDecode (s, output);
184                 }
185
186                 public override string UrlEncode (string s)
187                 {
188                         return w.UrlEncode (s);
189                 }
190
191                 public override void UrlEncode (string s, TextWriter output)
192                 {
193                         w.UrlEncode (s, output);
194                 }
195
196                 public override string UrlPathEncode (string s)
197                 {
198                         return w.UrlPathEncode (s);
199                 }
200
201                 [MonoTODO]
202                 public override byte [] UrlTokenDecode (string input)
203                 {
204                         // return w.UrlTokenDecode (input);
205                         throw new NotImplementedException ();
206                 }
207
208                 [MonoTODO]
209                 public override string UrlTokenEncode (byte [] input)
210                 {
211                         // return w.UrlTokenEncode (input);
212                         throw new NotImplementedException ();
213                 }
214         }
215 }