2 // HttpServerUtilityWrapper.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
7 // Copyright (C) 2008 Novell Inc. http://novell.com
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:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
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.
31 using System.Collections;
32 using System.Collections.Generic;
33 using System.Collections.Specialized;
34 using System.Globalization;
36 using System.Security.Permissions;
37 using System.Security.Principal;
38 using System.Web.Caching;
39 using System.Web.Profile;
43 [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
44 [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
45 public class HttpServerUtilityWrapper : HttpServerUtilityBase
49 public HttpServerUtilityWrapper (HttpServerUtility httpServerUtility)
51 if (httpServerUtility == null)
52 throw new ArgumentNullException ("httpServerUtility");
53 w = httpServerUtility;
56 public override string MachineName {
57 get { return w.MachineName; }
60 public override int ScriptTimeout {
61 get { return w.ScriptTimeout; }
62 set { w.ScriptTimeout = value; }
65 public override void ClearError ()
70 public override object CreateObject (string progID)
72 return w.CreateObject (progID);
75 public override object CreateObject (Type type)
77 return w.CreateObject (type);
80 public override object CreateObjectFromClsid (string clsid)
82 return w.CreateObjectFromClsid (clsid);
85 public override void Execute (string path)
90 public override void Execute (string path, bool preserveForm)
92 w.Execute (path, preserveForm);
95 public override void Execute (string path, TextWriter writer)
97 w.Execute (path, writer);
100 public override void Execute (string path, TextWriter writer, bool preserveForm)
102 w.Execute (path, writer, preserveForm);
105 public override void Execute (IHttpHandler handler, TextWriter writer, bool preserveForm)
107 w.Execute (handler, writer, preserveForm);
110 public override Exception GetLastError ()
112 return w.GetLastError ();
115 public override string HtmlDecode (string s)
117 return w.HtmlDecode (s);
120 public override void HtmlDecode (string s, TextWriter output)
122 w.HtmlDecode (s, output);
125 public override string HtmlEncode (string s)
127 return w.HtmlEncode (s);
130 public override void HtmlEncode (string s, TextWriter output)
132 w.HtmlEncode (s, output);
135 public override string MapPath (string path)
137 return w.MapPath (path);
140 public override void Transfer (string path)
145 public override void Transfer (string path, bool preserveForm)
147 w.Transfer (path, preserveForm);
150 public override void Transfer (IHttpHandler handler, bool preserveForm)
152 w.Transfer (handler, preserveForm);
156 public override void TransferRequest (string path)
158 // return TransferRequest (path);
159 throw new NotImplementedException ();
163 public override void TransferRequest (string path, bool preserveForm)
165 // return TransferRequest (path, preserveForm);
166 throw new NotImplementedException ();
170 public override void TransferRequest (string path, bool preserveForm, string method, NameValueCollection headers)
172 // return TransferRequest (path, preserveForm, method, headers);
173 throw new NotImplementedException ();
176 public override string UrlDecode (string s)
178 return w.UrlDecode (s);
181 public override void UrlDecode (string s, TextWriter output)
183 w.UrlDecode (s, output);
186 public override string UrlEncode (string s)
188 return w.UrlEncode (s);
191 public override void UrlEncode (string s, TextWriter output)
193 w.UrlEncode (s, output);
196 public override string UrlPathEncode (string s)
198 return w.UrlPathEncode (s);
202 public override byte [] UrlTokenDecode (string input)
204 // return w.UrlTokenDecode (input);
205 throw new NotImplementedException ();
209 public override string UrlTokenEncode (byte [] input)
211 // return w.UrlTokenEncode (input);
212 throw new NotImplementedException ();