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.Runtime.CompilerServices;
37 using System.Security.Permissions;
38 using System.Security.Principal;
39 using System.Web.Caching;
40 using System.Web.Profile;
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
51 public HttpServerUtilityWrapper (HttpServerUtility httpServerUtility)
53 if (httpServerUtility == null)
54 throw new ArgumentNullException ("httpServerUtility");
55 w = httpServerUtility;
58 public override string MachineName {
59 get { return w.MachineName; }
62 public override int ScriptTimeout {
63 get { return w.ScriptTimeout; }
64 set { w.ScriptTimeout = value; }
67 public override void ClearError ()
72 public override object CreateObject (string progID)
74 return w.CreateObject (progID);
77 public override object CreateObject (Type type)
79 return w.CreateObject (type);
82 public override object CreateObjectFromClsid (string clsid)
84 return w.CreateObjectFromClsid (clsid);
87 public override void Execute (string path)
92 public override void Execute (string path, bool preserveForm)
94 w.Execute (path, preserveForm);
97 public override void Execute (string path, TextWriter writer)
99 w.Execute (path, writer);
102 public override void Execute (string path, TextWriter writer, bool preserveForm)
104 w.Execute (path, writer, preserveForm);
107 public override void Execute (IHttpHandler handler, TextWriter writer, bool preserveForm)
109 w.Execute (handler, writer, preserveForm);
112 public override Exception GetLastError ()
114 return w.GetLastError ();
117 public override string HtmlDecode (string s)
119 return w.HtmlDecode (s);
122 public override void HtmlDecode (string s, TextWriter output)
124 w.HtmlDecode (s, output);
127 public override string HtmlEncode (string s)
129 return w.HtmlEncode (s);
132 public override void HtmlEncode (string s, TextWriter output)
134 w.HtmlEncode (s, output);
137 public override string MapPath (string path)
139 return w.MapPath (path);
142 public override void Transfer (string path)
147 public override void Transfer (string path, bool preserveForm)
149 w.Transfer (path, preserveForm);
152 public override void Transfer (IHttpHandler handler, bool preserveForm)
154 w.Transfer (handler, preserveForm);
158 public override void TransferRequest (string path)
160 // return TransferRequest (path);
161 throw new NotImplementedException ();
165 public override void TransferRequest (string path, bool preserveForm)
167 // return TransferRequest (path, preserveForm);
168 throw new NotImplementedException ();
172 public override void TransferRequest (string path, bool preserveForm, string method, NameValueCollection headers)
174 // return TransferRequest (path, preserveForm, method, headers);
175 throw new NotImplementedException ();
178 public override string UrlDecode (string s)
180 return w.UrlDecode (s);
183 public override void UrlDecode (string s, TextWriter output)
185 w.UrlDecode (s, output);
188 public override string UrlEncode (string s)
190 return w.UrlEncode (s);
193 public override void UrlEncode (string s, TextWriter output)
195 w.UrlEncode (s, output);
198 public override string UrlPathEncode (string s)
200 return w.UrlPathEncode (s);
204 public override byte [] UrlTokenDecode (string input)
206 // return w.UrlTokenDecode (input);
207 throw new NotImplementedException ();
211 public override string UrlTokenEncode (byte [] input)
213 // return w.UrlTokenEncode (input);
214 throw new NotImplementedException ();